@xmlking/nativescript-ngx-microsoftband
by xmlking | v0.1.5
Microsoft Band Plugin for NativeScript with Angular.
npm i --save @xmlking/nativescript-ngx-microsoftband

MicrosoftBand Plugin for Telerik NativeScript

This NativeScript plugin enables building Mobile apps to display Microsoft Band sensors data. This plugin uses MicrosoftBand CocoaPod written in Swift and Band SDK.

Demo

Install

Prerequisites

  1. Node > 8.0.0
  2. NativeScript CLI > 3.0.0
    yarn global add nativescript --ignore-engines
  3. Cocoapods
    gem install cocoapods
    pod repo update

Plugin

tns plugin add @xmlking/nativescript-ngx-microsoftband

Usage

1. import the MicrosoftBandModule module

import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";
import { NativeScriptModule } from "nativescript-angular/nativescript.module";
import { MicrosoftBandModule } from '@xmlking/nativescript-ngx-microsoftband';

import { AppComponent } from "./app.component";

@NgModule({
imports: [
NativeScriptModule,
MicrosoftBandModule.forRoot()
],
declarations: [
AppComponent
],
bootstrap: [
AppComponent
],
schemas: [
NO_ERRORS_SCHEMA
]
})
export class AppModule { }

2. use it in your service/component

Refer app.component.ts and heart-rate.component.ts

Build

Building and publishing the plugin.

Setup

yarn run setup

Build

yarn run build

Publish

cd dist
npm publish

Example App

Setup and Run Example app

Setup

cd src
tns plugin remove @xmlking/nativescript-ngx-microsoftband; tns plugin add ../dist
# tns platform remove ios # cleanup?

Run

cd src
tns prepare ios
tns build ios --release
# open src/platforms/ios/src.xcworkspace project in xcode and run on attached iOS devise.

Credits

Idea came from NathanWalker, Minko Gechev

Contributors

License

MIT

https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/#Usage_with_TypeScript