nativescript-beacon-ins
The node module for the INS Beacon Scanner Plugin for NativeScript.
npm i --save nativescript-beacon-ins
- Version: 1.2.6
- GitHub:
- NPM: https://www.npmjs.com/package/nativescript-beacon-ins
- Downloads:
- Last Day: 0
- Last Week: 0
- Last Month: 0
INS Beacon Scanner for NativeScript
The node module for the INS Beacon Scanner Plugin for NativeScript.
Getting started
-
Create a new NativeScript application
tns create MyApp
or use an existing one.
-
Add the Beacon Plugin (from NPM). This will install the Beacon plugin in the
node_modules
folder, in the root of the project. When adding a new platform (or using an existing one) the plugin will be added there as well. Go to the application folder and add the beacon plugin:tns plugin add nativescript-beacon-ins
Android
API
// Get reference to the push plugin module.
var beaconPlugin = require('nativescript-beacon-ins');
- startScanBeacon - use to scan bluetooth beacon ins device
startScanBeacon(settings, successCallback, errorCallback)
var settings = {
// iOS settings
timeoutAfter: 15, // scan bluetooth timeout
baseURL: 'Your config URL',
port: 'port',
orgId: 'orgId',
inspectionId: 'inspectionId'
};
beaconPlugin.startScanBeacon(settings,
// Success callback
function(token) {
alert('scan successfully');
},
// Error Callback
function(error){
alert(error.message);
}
);