I have viewed many unofficial MiBand SDKs in Github. (e.g. https://github.com/Freeyourgadget/Gadgetbridge) None includes detect when button touching, but I have viewed apps to detect this feature.
For example Mi Band 2 Func Button.
Also I have tried sniffing bluetooth data traces, but just show data because mobile device is not rooted and I haven't rooted.
Is there any way I can detect the touch of a miband button?
Thanks a lot!
You can listen if there is any touches event on the Mi Band device.
Assuming that the app authenticated...
Start notification to UUID_CHARACTERISTIC_DEVICEEVENT characteristic (In my case it's "00000010-0000-3512-2118-0009af100700")
and you shall receive '\x04' if the device touched.
Related
Is there a way to send a flag or a single number or character to my app running on a device using android developer console or by using any other way, without touching the mobile device?
Example :
Say I have a mobile. I install my app-test.apk in the device by downloading it from google play or by transferring it to the sd card.
Now the app is running in my mobile.
What I want is to send a message/a flag/a number/a character or anything to the app so that the app identifies it and perform some action, some sort of a trigger for some condition. Like app shows a toast messages saying "I am running". All this without touching the device.
If it is not possible how can I achieve this by just shaking the device or pressing the volume button with device in locked state or by minimal touching the device ?
Is this possible ?
Thanks !
Some days ago I have written this question: Is possible to detect touches in MiBand 2?
I discovered using Wireshark that when I pulse MiBand button, the band send a UUID code to the mobile device.
I modifed this sample https://github.com/googlesamples/android-BluetoothLeGatt to capture this event and for example show a Toast in screen. But However hard I tried, I do not advance.
Methods onDescriptorRead() and onCharacteristicRead() never called.
How is the way to capture this special characteristic using GATT in Android?
Thanks a lot
I have a problem in sending touch events to Android (not to a specific application, system-wide touch events) through bluetooth.
I know that there are similar questions, but I still could not find the solution. I will be really happy if somebody helps me on this issue.
You can find details of my problem below :
Requirement :
To send remote touch events to Android (without root) through bluetooth.
Possible options I discovered so far :
1) Use of ADB commands - This is possible via USB cable and over network connection; however it is not allowed via bluetooth. Workaround I thought of :
To write an Android application with a background service which listens for Bluetooth inputs; and once it receives input, it runs ADB commands within the app itself. However, I think this requires rooted Android.
2) MonkeyRunner - I think this is also not possible through bluetooth.
3) Accessibility Service - According to my research, writing an accessibility service may be a solution to simulate touch events only when specific conditions are met (e.g. view clicks). But I need to initiate the touch from an external bluetooth device, without waiting for a specific condition.
4) Connecting the external bluetooth device as a HID (e.g. mouse) and simulate the touch on mouse button click. But in this case, the mouse pointer will always be visible to user. I also could not find a way to hide the mouse pointer. There are some tutorials to customise the pointer (e.g. a bigger one), but as I saw transparent mouse pointer is not supported.
I found an application called AutoInput (a Tasker plugin), which simulates touch events, but I could not get any feedback about how it works actually, I could not find how it simulates touch events.
Thanks in advance for your help.
Regards
I am writing Bluetooth mouse driver app for android. I want to know is that possible to implement mouse cursor in same fashion as on desktop?
What I have done so far is that I have connected my HID mouse to android device via Bluetooth. Mouse is sending reports to device and the Intent service receive it and parse it broadcast x and y coordinates. Now I want to display cursor with same functionality as on desktop.
Is that possible, and if so, how is it done?
Yes, it's been done, and mouse support is included in android from 3.1 up.
Just wait for an update to your device.
I am new to android. I am trying to lock the device using voice . I recorded the voice with media recorder but now How I lock the phone with this voice ? plz any idea.
Interesting, but u need to probably do more work that mere speculation here. A quick brainstorm:
your app must be a device admin to be able to lock the device
to lock the device, this device admin could be "told" via a broadcast event routed to it
the "lock device" event can be raised by another / same app if it can capture from the mic,
probably forward this to a server that can do speech-to-text (Google has something), then yo app tries to recognize whether the response text matches the "lock" criteria. If it does, then broadcast the "lock" event.
This heavily depends on how good the speech-to-text part is done, otherwise, explore along those lines.