Microsoft Band Plugin for NativeScript with Angular
MIT License
This NativeScript plugin enables building Mobile apps to display Microsoft Band sensors data. This plugin uses MicrosoftBand CocoaPod written in Swift and Band SDK.
yarn global add nativescript --ignore-engines
gem install cocoapods
pod repo update
tns plugin add @xmlking/nativescript-ngx-microsoftband
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 { }
Refer app.component.ts and heart-rate.component.ts
Building and publishing the plugin.
yarn run setup
yarn run build
cd dist
npm publish
Setup and Run Example app
cd src
tns plugin remove @xmlking/nativescript-ngx-microsoftband; tns plugin add ../dist
# tns platform remove ios # cleanup?
cd src
tns prepare ios
tns build ios --release
# open src/platforms/ios/src.xcworkspace project in xcode and run on attached iOS devise.
Idea came from NathanWalker, Minko Gechev