nativescript-beacon-ins
v1.2.6
Published
The node module for the INS Beacon Scanner Plugin for NativeScript.
Readme
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 MyAppor use an existing one.
Add the Beacon Plugin (from NPM). This will install the Beacon plugin in the
node_modulesfolder, 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);
}
);
