@xmlking/nativescript-ngx-microsoftband
v0.1.5
Published
Microsoft Band Plugin for NativeScript with Angular.
Downloads
11
Maintainers
Readme
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.
Install
Prerequisites
- Node > 8.0.0
- NativeScript CLI > 3.0.0
yarn global add nativescript --ignore-engines
- 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
https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/#Usage_with_TypeScript