bluetooth lowenergy - BluetoothLEGatt sample codes in Android Studio to ON/OFF LED lights -


i'm looking "simple" pair of app written in android studio , code in mbed work together, , allow: - send app mbed (led on/off) - send mbed app (button status) - notify mbed app, (ring when button pressed)

any pointers or guidance appreciated, , i'll make resulting mbed code , app source public here on mbed.

i've worked through several of examples here on mbed (htm, htm, uart, more...), have used them nordic sample apps (nrf-mcp, toolbox, etc.). apps written in older eclipse, , when imported new android studio result quite cryptic code versus beginner needs. i've looked @ apps other suppliers tend use custom older libraries, not latest mbed, android studio, or android sdk.

the android studio sample code i've found ble bluetoothlegatt, generic starting point connect , list services, nothing past that: http://developer.android.com/samples/bluetoothlegatt/index.html.

please me. in advance.

i found myself. ohh

 @override         public void onclick(view v) {             if (v.getid() == r.id.red_button) {                 if ((v.gettag() != null)                         && (v.gettag() instanceof bluetoothgattcharacteristic)) {                     bluetoothgattcharacteristic ch = (bluetoothgattcharacteristic) v                             .gettag();                      ch.setvalue(new byte[] { (byte) 0x03 });                     if (mconngatt.readcharacteristic(ch)) {                         setprogressbarindeterminatevisibility(true);                     }                 } 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -