JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q89565F
  • License Apache-2.0

Add a plugin description

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@manojdcoder/nativescript-pedometer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    @manojdcoder/nativescript-pedometer

    ns plugin add @manojdcoder/nativescript-pedometer

    Usage

    Example

    Refer the demo app

    Android Settings

    Foreground service is used to continuously monitor step counts even app is in background or not running or killed. The webpack configuration must be adjusted to include the foreground service,

    const webpack = require('@nativescript/webpack');
    const { resolve } = require('path');
    
    module.exports = (env) => {
      // Copy the line below to your webpack.config.js
      env.appComponents = (env.appComponents || []).concat([resolve(__dirname, 'node_modules/@manojdcoder/nativescript-pedometer/step-counter-broadcast-receiver.android')]);
    
      webpack.init(env);
      webpack.useConfig('typescript');
    
      webpack.chainWebpack((config) => {
        // shared demo code
        config.resolve.alias.set('@demo/shared', resolve(__dirname, '..', '..', 'tools', 'demo'));
      });
    
      // Example if you need to share images across demo apps:
      // webpack.Utils.addCopyRule({
      //   from: '../../../tools/images',
      // 	to: 'images',
      //   context: webpack.Utils.project.getProjectFilePath('node_modules')
      // });
    
      return webpack.resolveConfig();
    };

    License

    Apache License Version 2.0