Originally Posted by IG_Vasilich
I will check this app tonight.
My unit has 5 HW buttons: FF, REW, DVD, MUTE, MODE.
I want to change function for DVD (as the HU has no DVD drive), mute (as it repeats function of volume knob press) and Mode(to change it to app of my choice).
Will mute button work separately of volume knob press?
Is it possible to call specific activity on some app (if that app has several ones)?
Can you share the methods you have used in this app for rerouting button presses (short, in technical terms)?
Thanks in advance.
The "application" buttons simply call the app connected to it. I could easily capture that.
Mode will not work as it is an internally arranged "carroussel" function in the server apk. I can't capture that.
I don't know whether the mute button acts differently from the volume knob press. Also in that case I can't capture it as it is a direct android keyevent call. You would really need Xposed to capture the entire function.
Currently my app only allows for calling an app by package name, which will always start the default launching activity. I have already the layout ready for a "call by intent" which allows you to call any activity which is defined in the AndroidManifest of that app: This is what you are asking for. I will also add a system call.
The point is that I wanted to wait how many people would use my app before putting more time in it. It has only been downloaded 4 times: 2x by me, 1x by you (I assume), and someone else (I guess Paul Borges).
Of course the "audience" is rather limited as it only deals with those units having hardware buttons.
This apk is really a non-rooted "poor mans" Xposed spin off. The options are really limited in comparison with Xposed, but then of course you need root and Xposed.
- I checked in the AndroidManifest.xml of the radio, music, dvd and eq apk what their launch intents/activities were.
- Then I created aliases for them in the AndroidManifest.xml of my OneKey app "targeting" those original intents/activities to activities in my app, which then call the configured apps.
- In that case Android finds two intents doing the same and therefore asking which app to start. It is actually exactly the same as clicking an html file where the Android Browser and Google Chrome (and/or firefox/opera/etc) have an intent defined which takes care of an html file. Or in case of a gpx file in case of several navigation apps.
Please have a look on my github at my AndroidManifest.xml
. I think i put it quite understandably in there
Edit: If you investigate the launch intents for for example TomTom or PowerAmp or whatever app, you could also capture them via aliases in "your" app if you would want that. That is also what the Google package installer does when you compare it to the default AOSP android package installer.