I have made some tests trying to detect a press on the small button included on some wired headsets.
When the activity is not paused, I get the activity keypress with value 79 each time. But when trying to detect it from a service using the code below, the service never starts. I am sorry as I am not still understanding the intent process so perhaps my code is not for this button ?
I have tried that, but it does not seem to have an affect. I am testing on android 4.4.4 Sony Experia (D2203). Can you upload what you have done and I will try it again pls. @lemonisdead
I have noticed this too, reason why I have always thought to have found :
- uninstall your app
- compile it and install it => it won't work
- compile it and install it again => it works
I have noticed this too, reason why I have always thought to have found :
- uninstall your app
- compile it and install it => it won't work
- compile it and install it again => it works
I have noticed this too, reason why I have always thought to have found :
- uninstall your app
- compile it and install it => it won't work
- compile it and install it again => it works
Yes I do (screenshot on the previous post). Your phone is not too old. Works on the WIKO Cink too.
The curious (odd ?) behavior is this one: when I first install the app after having uninstalled it, it takes a moment before to receive but when I install it over it then it works immediately).
But for now, even after having restarted, it works
Yes I do (screenshot on the previous post). Your phone is not too old. Works on the WIKO Cink too.
The curious (odd ?) behavior is this one: when I first install the app after having uninstalled it, it takes a moment before to receive but when I install it over it then it works immediately).
But for now, even after having restarted, it works
You are kind John but it was for a specific client so that project is far behind
Please do you confirm that when you install KeyCut and your app is installed, your app immediately receives the intent ?
Yes I do (screenshot on the previous post). Your phone is not too old. Works on the WIKO Cink too.
The curious (odd ?) behavior is this one: when I first install the app after having uninstalled it, it takes a moment before to receive but when I install it over it then it works immediately).
But for now, even after having restarted, it works
Yes I do (screenshot on the previous post). Your phone is not too old. Works on the WIKO Cink too.
The curious (odd ?) behavior is this one: when I first install the app after having uninstalled it, it takes a moment before to receive but when I install it over it then it works immediately).
But for now, even after having restarted, it works
You are kind John but it was for a specific client so that project is far behind
Please do you confirm that when you install KeyCut and your app is installed, your app immediately receives the intent ?
Oh, I dont know, I have a headache with this now, maybe there is limitation with b4a, I dont understand why it works for @lemonisdead and also only when keycut is installed.
Yes. If you restart phone, normaly, Keycut wil start on PWR ON. So you must uninstal and kill app with Advanced Task Killer, otherwise the service program keep runnung. You must also uninstal and stop your own service program.
Just tried that version, no KeyCut installed, phone restarted,uninstalled app, re-installed app, run app, click media button, no vibrate, no intent, and yet it works for you all the time ?
But, I would like to be the clearest as possible :
- no KeyCut installed, your app not installed, phone restarted
- I compile in Release(obfuscated) and install via USB : the app opens showing the Main Activity and it does not work immediately (it takes a while if I wait but I don't wait now)
- I compile in Realease(obfuscated) and install via USB over the just installed version. The Main Activity is shown, I press the MEDIA_BUTTON and it works
- I restart the phone and it works all the time. I have tried 10 times to be sure and tested on all the models I had listed previously.
But, I would like to be the clearest as possible :
- no KeyCut installed, your app not installed, phone restarted
- I compile in Release(obfuscated) and install via USB : the app opens showing the Main Activity and it does not work immediately (it takes a while if I wait but I don't wait now)
- I compile in Realease(obfuscated) and install via USB over the just installed version. The Main Activity is shown, I press the MEDIA_BUTTON and it works
- I restart the phone and it works all the time. I have tried 10 times to be sure and tested on all the models I had listed previously.
Just got it working, sort of, had to disable smart connect and some other apps on the Sony Phone, I managed 1 good click, then I did a long click and google search come up, at this point google now has control, I believe we need to register the intent via the audio_event, wich we are doing. Have you tried this ?
YESSSSS !!!! Got it working. I had to disable SmartConnect on Sony Phone and now I get the intents, thanks @lemonisdead and @star
Just got it working, sort of, had to disable smart connect and some other apps on the Sony Phone, I managed 1 good click, then I did a long click and google search come up, at this point google now has control, I believe we need to register the intent via the audio_event, wich we are doing. Have you tried this ?