Mercurial > party-buddy
changeset 8:4dd13ff170dd
Changed stuff
| author | Michal Kawalec <mkawalec@lavabit.com> |
|---|---|
| date | Sat, 01 Jun 2013 18:55:23 +0200 |
| parents | 1ec9513a1f1b |
| children | 5845b8b5d078 |
| files | assets/www/.index.html.swp assets/www/index.html bin/build.prop bin/partybuddy-debug-unaligned.apk bin/partybuddy-debug.apk bin/partybuddy.ap_ |
| diffstat | 6 files changed, 16 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/assets/www/index.html Sat Jun 01 18:35:08 2013 +0200 +++ b/assets/www/index.html Sat Jun 01 18:55:23 2013 +0200 @@ -34,11 +34,25 @@ // Cordova is ready // function onDeviceReady() { - plugin = cordova.require('cordova/plugin/bluetooth'); + plugin = window.plugins.bluetooth; plugin.listDevices(null, function(r){console.log(r)}, function(e){console.log(e)} ); + plugin.isBTEnabled(null, + function(r){console.log(r)}, + function(e){console.log(e)} + ); + + cordova.exec(sucCallback, failCallback, 'BluetoothPlugin', 'listDevices', [null]); + } + + function sucCallback() { + console.log('success', arguments); + } + + function failCallback() { + console.log('error', arguments); } //navigator.accelerometer.getCurrentAcceleration(onSuccess, onError);
