[XPM] XposedMTC - multipe mods for MTCB-Headunits

Search This thread

agentdr8

Senior Member
Mar 4, 2007
3,648
1,896
Cowtown, CA
Discontinued
Due to a lack of free time and newer hardware (MTCD), I am no longer supporting this module. The code is freely available on my github.

XposedMTC -- mods for Huifei/RM/KLD/GS/JY headunits

Right now, the mod consists of the following features:

  • Change preferred music app from MTCMusic to something else
  • Change preferred video app from MTCMovie to something else
  • Ability to override the default mode switch behavior to include only the sources you want (in addition to Music)
  • Overridden mode switching can add your selected Nav app (in Settings->Gps) to the rotation
  • Ability to apply Loudness on boot (newer system images persist this setting)
  • Time-based dimmer and adjustable brightness level when time is outside dimming period
  • Ability to automatically set dimming start and end times based on current date, timezone, and GPS location (no data connection required)
  • Ability to learn your radio presets and re-apply them if/when the presets get lost (usually on hard-reset)
  • 3 replacement launchers for user-selected Music, Videos, and Radio apps for non-SWC vehicles
  • Preference to allow all BT OBD adapters to pair with headunit
  • Intents to start and stop the XMTC service
  • Preference to override the stock volume OSD and place volume level in the statusbar
  • Launcher to manually start the reverse camera view (BackView) -- disabled for now
  • Screen Filter integration for ultimate dimming control

Changelog
  • v1.0 - Initial release
  • v1.0.1 - Added Playerpro control intents -- forgot to change startService to sendBroadcast for Playerpro -- redownload this if you previously downloaded it
  • v1.2 - Added dimmer control, debug preference
  • v1.2.1 - Fixed switchpreference controls that were disabling themselves
  • v1.2.5 - Added replacement launchers for Music, Video, and Radio for non-SWC users
  • v1.3.0 - Rolled all beta and experimental changes into a stable build
  • v1.4.2 - Fixed BT OBD override (tested on latest Malaysk rom with a generic BT ELM327 v1.5 adapter with name CBT.)

Things for the future
  • Hard button remapping -- mtc-keys works for this
  • Add user-selected app to the mode switch rotation (e.g. Torque)
  • Fix system crash when Line-In (AUX) source is added to modeswitch rotation
  • Figure out a way to turn off the backlight completely, and allow it to be mapped to a button press/long press -- Screen Filter integration allows for complete backlight adjustment
  • Add preference to enable full backlight brightness when BackView is foreground
  • Add preference to enable dimmer control via headlight switch/illumination wire

Translations
If anyone would like to submit a translation in their native language (or one other than US English), please visit this link and contribute. Thanks!

Completed translations (thanks!)
Hungarian - @peti007

This module requires that you first install the Xposed Framework and enable the app_process.

Added the module to the Xposed Repo for easy updating from the headunit.
 

Attachments

  • device-2014-07-22-155630.png
    device-2014-07-22-155630.png
    31.3 KB · Views: 18,422
  • device-2014-07-22-155649.png
    device-2014-07-22-155649.png
    29.4 KB · Views: 18,216
  • device-2014-07-22-155700.png
    device-2014-07-22-155700.png
    26.7 KB · Views: 18,060
  • XposedMTC_v1.0.apk
    392.9 KB · Views: 762
  • XposedMTC_v1.0.1.apk
    393 KB · Views: 210
  • XposedMTC_v1.2.apk
    393.7 KB · Views: 221
  • XposedMTC_v1.2.1.apk
    396.1 KB · Views: 276
  • XposedMTC_v1.2.5.apk
    422 KB · Views: 430
  • XposedMTC_v.1.3.apk
    442.5 KB · Views: 1,151
  • XposedMTC_v1.4.2.apk
    523.9 KB · Views: 6,963
Last edited:

Syphe

Member
Aug 3, 2007
20
7
Don't know if this is the right place for this, but I've searched around and can't find an answer.

Am having a problem setting default Music app, i've changed it to poweramp, and it works great, however have noticed that when I start the radio app, then switch to poweramp, the radio app doesn't stop. Is there anything else I have to setup to get the radio app to mute when changing a music app?
 

agentdr8

Senior Member
Mar 4, 2007
3,648
1,896
Cowtown, CA
Am having a problem setting default Music app, i've changed it to poweramp, and it works great, however have noticed that when I start the radio app, then switch to poweramp, the radio app doesn't stop. Is there anything else I have to setup to get the radio app to mute when changing a music app?

How are you switching between PA and Radio? Mode button or launcher icon?

If you're not using a mode button on steering wheel controls, then you have to use the included launchers called MyMusic, and MyRadio in order to properly switch audio sources.
 
  • Like
Reactions: rhacy

Syphe

Member
Aug 3, 2007
20
7
My unit has hardware buttons which launch the sources, so I use those, I did notice launching MyMusic did mute the radio (think it launched MTCMusic), but the "Media" button on the unit just launched poweramp (after changing default app in xposedmtc) and left the radio going.
 

agentdr8

Senior Member
Mar 4, 2007
3,648
1,896
Cowtown, CA
My unit has hardware buttons which launch the sources, so I use those, I did notice launching MyMusic did mute the radio (think it launched MTCMusic), but the "Media" button on the unit just launched poweramp (after changing default app in xposedmtc) and left the radio going.

Oh I see. You can use mtc-keys to remap those buttons to launch the MyMusic and MyRadio activities.
 
  • Like
Reactions: WestlakeSt

WestlakeSt

Member
Nov 9, 2015
14
2
Oh I see. You can use mtc-keys to remap those buttons to launch the MyMusic and MyRadio activities.

cheers, I'll give that a try next time I get in the car :)

Hi,
I have been having similar issue with my Pumpkin head unit which also has hard buttons. I'm running XposedMTC and mtc-keys modules and I'd already used mtc-keys to map my "MEDIA" hard button to music app directly as XposedMTC on its own didn't do it for my chosen music app. When I switch from music app (Mixzing) to Radio the music app is still playing.

I hadn't spotted the "MyMusic" and "MyRadio" activities in the app drawer screen before (only had the unit just over a week) but even using these these instead of the hard buttons the music app still plays over the radio and vice versa (i.e one doesn't stop the other). Shame as when I found your posts above I thought these activities would be the solution to my issue and I could just remap hardware buttons to these with mtc-keys. :crying:
 

WestlakeSt

Member
Nov 9, 2015
14
2
Originally the only supported media player in XMTC was Poweramp, but I've since added PlayerPro, and few others that utilize generic Android intents for control. It's possible Mixzing doesn't listen for these intents, and specific support would need to be added.

Hi agentdr8,
Thanks for the information. I will try Poweramp and PlayerPro as Mixzing is just one of a few alternative apps I'm trying out so not committed to keeping it at this stage. If Poweramp or Player Pro work well for a car head unit in terms of user interface and hardware abilities (i.e. hard buttons working as I want) then I will purchase one or the other.
Will get the trials for each app and give them a try tomorrow.

Kind regards,
Steve
 

WestlakeSt

Member
Nov 9, 2015
14
2
I believe the proper mtc-keys.ini syntax would look something like:

activity_##=com.dr8.xposedmtc/.activities.Music
activity_##=com.dr8.xposedmtc/.activities.Radio

Where ## is the keycode of that particular button.

Hi agentdr8,
I have now tried Poweramp and PlayerPro and both will switch the radio off if I use the MyMusic/MyRadio icons. So I tried using the above syntax in the mtc-keys.ini for the appropriate key codes but this doesn't appear to work. I amended them on the off chance that it may have needed to be "MyMusic" and "MyRadio" at the end of each line (as that is what the icons are called in the app drawer part) but either way nothing is triggered on pushing the buttons.
 

agentdr8

Senior Member
Mar 4, 2007
3,648
1,896
Cowtown, CA
Hi agentdr8,
I have now tried Poweramp and PlayerPro and both will switch the radio off if I use the MyMusic/MyRadio icons. So I tried using the above syntax in the mtc-keys.ini for the appropriate key codes but this doesn't appear to work. I amended them on the off chance that it may have needed to be "MyMusic" and "MyRadio" at the end of each line (as that is what the icons are called in the app drawer part) but either way nothing is triggered on pushing the buttons.

Hmm. I may have to export those activities in the manifest, based on what I read on the mtc-keys info.

EDIT: Since I have an intent filter on those activities, they should be exported by default. The mtc-keys syntax might need tweaking. Try activity_##=com.dr8.xposedmtc.activities/Radio
 
Last edited:

robertut

Senior Member
May 11, 2007
284
48
@agentdr8, can you please add a dark theme to this app? I mean, black background and white text?
It kills my eyes every time I open it...

Cheers!
 

Syphe

Member
Aug 3, 2007
20
7
Hi agentdr8,
I have now tried Poweramp and PlayerPro and both will switch the radio off if I use the MyMusic/MyRadio icons. So I tried using the above syntax in the mtc-keys.ini for the appropriate key codes but this doesn't appear to work. I amended them on the off chance that it may have needed to be "MyMusic" and "MyRadio" at the end of each line (as that is what the icons are called in the app drawer part) but either way nothing is triggered on pushing the buttons.
I'm getting the same thing. When I change mtc-keys, my home screen just receives a home key press (I think).
If I change activity to app and set a package name, it loads the app, so just an issue with activity_xx not resolving.
 

WestlakeSt

Member
Nov 9, 2015
14
2
Hmm. I may have to export those activities in the manifest, based on what I read on the mtc-keys info.

EDIT: Since I have an intent filter on those activities, they should be exported by default. The mtc-keys syntax might need tweaking. Try activity_##=com.dr8.xposedmtc.activities/Radio

I'm getting the same thing. When I change mtc-keys, my home screen just receives a home key press (I think).
If I change activity to app and set a package name, it loads the app, so just an issue with activity_xx not resolving.

Hi again,
Just to update. I am still not having much luck with getting the hardware keys to work. I have tried the following combinations in the mtc-keys.ini file (only one pair at a time) and rebooted the unit each time
43 is my "MEDIA" button and 42 is my "BAND" button which I would like to map to Poweramp and Radio respectively.

activity_43=com.dr8.xposedmtc/.activities.Music
activity_42=com.dr8.xposedmtc/.activities.Radio

activity_43=com.dr8.xposedmtc/.activities.MyMusic
activity_42=com.dr8.xposedmtc/.activities.MyRadio

activity_43=com.dr8.xposedmtc.activities/Music
activity_42=com.dr8.xposedmtc.activities/Radio

activity_43=com.dr8.xposedmtc.activities/MyMusic
activity_42=com.dr8.xposedmtc.activities/MyRadio

activity_43=com.dr8.xposedmtc.activities/.Music
activity_42=com.dr8.xposedmtc.activities/.Radio

activity_43=com.dr8.xposedmtc.activities/.MyMusic
activity_42=com.dr8.xposedmtc.activities/.MyRadio

NB: I tried "MyMusic" and "MyRadio" since that is the name of the icon if you go to the apps drawer.

With some of the above, pushing the hardware button would take me back to the home screen, but wouldnt stop anything playing or launch anything else. To be clear, if I'd launched Poweramp with the MyMusic activity in the app drawer and then pushed the BAND hardware button, the unit would return to the home screen, but poweramp would still be playing and the radio would not launch.
Other combinations would do nothing at all.

Are there any other possible combinations I could try i.e. dots and slashes being in different places?
Just for information to anyone who is going to try and suggest help I know next to nothing about android programming or how apps work behind the scenes so please feel free to be very patronizing in how to possibly get this working in the mtc-keys ini file. :fingers-crossed:
 

agentdr8

Senior Member
Mar 4, 2007
3,648
1,896
Cowtown, CA
Are there any other possible combinations I could try i.e. dots and slashes being in different places?
Just for information to anyone who is going to try and suggest help I know next to nothing about android programming or how apps work behind the scenes so please feel free to be very patronizing in how to possibly get this working in the mtc-keys ini file. :fingers-crossed:

I'll take a look at mtc-keys and figure out what the proper syntax is. It definitely wouldn't be the My* names, as those are just the labels for the launcher icons. The activity classes are named Music and Radio.
 

p_mike83

Senior Member
Jan 16, 2008
119
36
Hi again,
Just to update. I am still not having much luck with getting the hardware keys to work. I have tried the following combinations in the mtc-keys.ini file (only one pair at a time) and rebooted the unit each time
43 is my "MEDIA" button and 42 is my "BAND" button which I would like to map to Poweramp and Radio respectively.

activity_43=com.dr8.xposedmtc/.activities.Music
activity_42=com.dr8.xposedmtc/.activities.Radio

activity_43=com.dr8.xposedmtc/.activities.MyMusic
activity_42=com.dr8.xposedmtc/.activities.MyRadio

activity_43=com.dr8.xposedmtc.activities/Music
activity_42=com.dr8.xposedmtc.activities/Radio

activity_43=com.dr8.xposedmtc.activities/MyMusic
activity_42=com.dr8.xposedmtc.activities/MyRadio

activity_43=com.dr8.xposedmtc.activities/.Music
activity_42=com.dr8.xposedmtc.activities/.Radio

activity_43=com.dr8.xposedmtc.activities/.MyMusic
activity_42=com.dr8.xposedmtc.activities/.MyRadio

NB: I tried "MyMusic" and "MyRadio" since that is the name of the icon if you go to the apps drawer.

With some of the above, pushing the hardware button would take me back to the home screen, but wouldnt stop anything playing or launch anything else. To be clear, if I'd launched Poweramp with the MyMusic activity in the app drawer and then pushed the BAND hardware button, the unit would return to the home screen, but poweramp would still be playing and the radio would not launch.
Other combinations would do nothing at all.

Are there any other possible combinations I could try i.e. dots and slashes being in different places?
Just for information to anyone who is going to try and suggest help I know next to nothing about android programming or how apps work behind the scenes so please feel free to be very patronizing in how to possibly get this working in the mtc-keys ini file. :fingers-crossed:

You can try writing app_43=package name instead of activity_43=activity. You can find the package name of the application using an app from play store, search for package name viewer.
 

agentdr8

Senior Member
Mar 4, 2007
3,648
1,896
Cowtown, CA
You can try writing app_43=package name instead of activity_43=activity. You can find the package name of the application using an app from play store, search for package name viewer.

For most packages, that's fine, as there's only a single activity within it. But with XMTC, the default activity is the preferences, and then there's the 3 My* activities.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 45
    Discontinued
    Due to a lack of free time and newer hardware (MTCD), I am no longer supporting this module. The code is freely available on my github.

    XposedMTC -- mods for Huifei/RM/KLD/GS/JY headunits

    Right now, the mod consists of the following features:

    • Change preferred music app from MTCMusic to something else
    • Change preferred video app from MTCMovie to something else
    • Ability to override the default mode switch behavior to include only the sources you want (in addition to Music)
    • Overridden mode switching can add your selected Nav app (in Settings->Gps) to the rotation
    • Ability to apply Loudness on boot (newer system images persist this setting)
    • Time-based dimmer and adjustable brightness level when time is outside dimming period
    • Ability to automatically set dimming start and end times based on current date, timezone, and GPS location (no data connection required)
    • Ability to learn your radio presets and re-apply them if/when the presets get lost (usually on hard-reset)
    • 3 replacement launchers for user-selected Music, Videos, and Radio apps for non-SWC vehicles
    • Preference to allow all BT OBD adapters to pair with headunit
    • Intents to start and stop the XMTC service
    • Preference to override the stock volume OSD and place volume level in the statusbar
    • Launcher to manually start the reverse camera view (BackView) -- disabled for now
    • Screen Filter integration for ultimate dimming control

    Changelog
    • v1.0 - Initial release
    • v1.0.1 - Added Playerpro control intents -- forgot to change startService to sendBroadcast for Playerpro -- redownload this if you previously downloaded it
    • v1.2 - Added dimmer control, debug preference
    • v1.2.1 - Fixed switchpreference controls that were disabling themselves
    • v1.2.5 - Added replacement launchers for Music, Video, and Radio for non-SWC users
    • v1.3.0 - Rolled all beta and experimental changes into a stable build
    • v1.4.2 - Fixed BT OBD override (tested on latest Malaysk rom with a generic BT ELM327 v1.5 adapter with name CBT.)

    Things for the future
    • Hard button remapping -- mtc-keys works for this
    • Add user-selected app to the mode switch rotation (e.g. Torque)
    • Fix system crash when Line-In (AUX) source is added to modeswitch rotation
    • Figure out a way to turn off the backlight completely, and allow it to be mapped to a button press/long press -- Screen Filter integration allows for complete backlight adjustment
    • Add preference to enable full backlight brightness when BackView is foreground
    • Add preference to enable dimmer control via headlight switch/illumination wire

    Translations
    If anyone would like to submit a translation in their native language (or one other than US English), please visit this link and contribute. Thanks!

    Completed translations (thanks!)
    Hungarian - @peti007

    This module requires that you first install the Xposed Framework and enable the app_process.

    Added the module to the Xposed Repo for easy updating from the headunit.
    4
    Hi @agentdr8, is that possible to fix the XposedMTC in Malaysk April rom? as cant change the default music player to 3rd party player

    Yes, it's on my list of things to do.
    3
    thanks, it looks awesome but - I cannot install it on my generic HU 4.1.1... :crying:
    it there any compatible apk?

    4.1.1? Try one of the older builds...like 1.2.8. I take that back; I don't believe I ever had a 4.1.1 device. My headunits all started at 4.2.2, so I have no idea if the module will work on JB 4.1.1. Is your headunit based on one of these roms? If it doesn't use the same type of MCU & OS, this module will likely do nothing.

    @agentdr8 appreciate your work over the time and have loved your module. Unfortunately my update to the latest malaysk has broken the volume mod as well :(

    Yeah, a whole bunch of stuff is broken in the module right now on the newer roms. The good news is that I've pulled my headunit out of my car, and it won't likely be going into my new car, so I'll be able to dev easier with it on the bench.
    2
    Just wait for update from agentdr8, current version of xmtc is incompatible with roms released after February.
    I really missing dimmer feature, so all we can do is to wait patiently.

    newest rom fixed the dimmer feature from what people said.

    Dave
    2
    It's currently on bitbucket, but I may migrate it over to github, as I have less and less free time these days to work on it.

    PM me, and I'll notify you when the migration is done, and you can contribute as you see fit.

    Dear agentdr8, we all look forward to your module, it is very bad without him :crying: