How to get the RSSI of bluetooth device in real time in Android 4.3? -
i developing application have connect bluetooth low energy device on android 4.3.
when force button, can rssi of ble device after connect device using bluetoothleservice.readremoterssi();
but want rssi in every sec ?? have seek runnable, does't phone call readremoterssi();
function in log.
final runnable runnable = new runnable() {
@override public void run() { // todo auto-generated method stub mbluetoothleservice.readremoterssi(); mhandler.postdelayed(runnable, 1000); }
};
where should type bluetoothleservice.readremoterssi();
??
in onresume
?? or how can allow app rssi ??
sorry english language , new this.
thanks direction!
i have solve it.
modify code of following:
final runnable runnable = new runnable() { @override public void run() { // todo auto-generated method stub mbluetoothleservice.readremoterssi(); mhandler.postdelayed(this, 1000); } };
and add together mhandler.postdelayed(runnable, 1000);
in oncreate
android bluetooth-lowenergy android-4.3-jelly-bean rssi
No comments:
Post a Comment