Hi, I'm attempting to use a BLE "Media Button" device (Satechi) to control a video recorder in my App. I've used Erel's example here https://www.b4x.com/android/forum/t...-app-is-in-the-background.124899/#post-787779 It does detect the BLE media button volume_up and volume_down very well. Unfortunately, if the media button is either waking up from sleep or going to sleep (because of no usage for about 15 minutes), it cause the Activity to stop and immediately restart. You get something like this in the log:
** Activity (main) Pause event (activity is not paused). **
** Activity (main) Create, isFirst = false **
Activity Start [this my log]
** Activity (main) Resume **
This would normally not be too much of an issue, however we are capturing mp4 video using Cam2_Exe at this point, and the Activity Create ruins the capture file. I am trying to figure out if this behavior is just the way things have to work, or if the BLE "wakeup and reconnect" commands, whatever they are, could be consumed in a background service without disturbing the focused activity.
** Activity (main) Pause event (activity is not paused). **
** Activity (main) Create, isFirst = false **
Activity Start [this my log]
** Activity (main) Resume **
This would normally not be too much of an issue, however we are capturing mp4 video using Cam2_Exe at this point, and the Activity Create ruins the capture file. I am trying to figure out if this behavior is just the way things have to work, or if the BLE "wakeup and reconnect" commands, whatever they are, could be consumed in a background service without disturbing the focused activity.