BB10-Cordova/simplexpbeaconplugin/sample/www/js/index.js
function() {
		if (cordova.plugins && cordova.plugins.simplexpbeacon) {

        	cordova.plugins.simplexpbeacon.pluginVersion(
        		function(data){

					console.log('XXXX DATA: ' + data);
					var json = JSON.parse(data);
					console.log('XXXX json.status: ' + json.status);				

					if (json.status === 'OK') {
						app.logMessage('Plugin Version: ' + json.plugin_version);
					} else {
						app.logMessage('Failed to get Plugin Version: ' + json.desc);
					}
	        	}
	        );

			cordova.plugins.simplexpbeacon.initialiseBluetooth(
				function(data){

					console.log('XXXX DATA: ' + data);
					var json = JSON.parse(data);
					console.log('XXXX json.status: ' + json.status);				

					if (json.status === 'OK') {
						app.logMessage('Bluetooth initialised');
						bluetoothInitialised = true;
					} else {
						app.logMessage('Bluetooth failed to initialise: ' + json.desc);
					}
				}
			);

			cordova.plugins.simplexpbeacon.addBeaconUuidToMonitor(
				"8AEFB031-6C32-486F-825B-E26FA193487D",
				function(data){

					console.log('XXXX DATA: ' + data);
					var json = JSON.parse(data);
					console.log('XXXX json.status: ' + json.status);				

					if (json.status === 'OK') {
						app.logMessage('Beacon added');
						bluetoothInitialised = true;
					} else {
						app.logMessage('Failed to add beacon: ' + json.desc);
					}
				}
			);
		} else {
			app.logMessage('SimplexpXpBeaconPlugin was not found');
		}
    }
function() {
		if (cordova.plugins && cordova.plugins.simplexpbeacon) {

        	cordova.plugins.simplexpbeacon.pluginVersion(
        		function(data){

					console.log('XXXX DATA: ' + data);
					var json = JSON.parse(data);
					console.log('XXXX json.status: ' + json.status);				

					if (json.status === 'OK') {
						app.logMessage('Plugin Version: ' + json.plugin_version);
					} else {
						app.logMessage('Failed to get Plugin Version: ' + json.desc);
					}
	        	}
	        );

			cordova.plugins.simplexpbeacon.initialiseBluetooth(
				function(data){

					console.log('XXXX DATA: ' + data);
					var json = JSON.parse(data);
					console.log('XXXX json.status: ' + json.status);				

					if (json.status === 'OK') {
						app.logMessage('Bluetooth initialised');
						bluetoothInitialised = true;
					} else {
						app.logMessage('Bluetooth failed to initialise: ' + json.desc);
					}
				}
			);

			cordova.plugins.simplexpbeacon.addBeaconUuidToMonitor(
				"8AEFB031-6C32-486F-825B-E26FA193487D",
				function(data){

					console.log('XXXX DATA: ' + data);
					var json = JSON.parse(data);
					console.log('XXXX json.status: ' + json.status);				

					if (json.status === 'OK') {
						app.logMessage('Beacon added');
						bluetoothInitialised = true;
					} else {
						app.logMessage('Failed to add beacon: ' + json.desc);
					}
				}
			);
		} else {
			app.logMessage('SimplexpXpBeaconPlugin was not found');
		}
    }
BT LE Beacon Plugin Initialise Bluetooth