Honda Hack map key issue and work around

rwsmith123

Senior Member
First Name
Richard
Joined
Jan 24, 2018
Threads
12
Messages
357
Reaction score
309
Location
Raleigh, NC
Vehicle(s)
2019 Honda Civic Sport Touring
Country flag
The issue is that if you want to map the long press of a key to an application you lose the short press native function, for example if you want to map the long press of the "Audio" button to an app you installed, then you lose the ability to short press the button to bring up the "Audio" function. I tried a few ideas to work around this issue but they didn't work. Then I thought that if there was an app you could install that would start the "Audio" function then you could assign the short key press to that app and regain the native function, so I learned how to write an app for Android that would do that. It worked so I then wrote apps for the "Phone" and "Map" buttons. Each app just launches the built in function (Android terminology is "Activity") and then exits. I also did an app to launch the eco trip computer (Info->Trip Computer), and the wallpaper clock (Info->Clock/Wallpaper). These are for cars with the Display Audio system, and the launchMap app is for models that have the built in Garmin navigation system. And of course use at your own risk. You can also disable the restore last function in Honda Hack (which I found doesn't work that well), and select one of these apps to run at startup if you always want to start in one of the corresponding functions.
Sponsored

 

Attachments

carl4

Senior Member
First Name
carl
Joined
Jan 20, 2019
Threads
3
Messages
95
Reaction score
34
Location
milwaukee
Vehicle(s)
2019 civic si
Country flag
The issue is that if you want to map the long press of a key to an application you lose the short press native function, for example if you want to map the long press of the "Audio" button to an app you installed, then you lose the ability to short press the button to bring up the "Audio" function. I tried a few ideas to work around this issue but they didn't work. Then I thought that if there was an app you could install that would start the "Audio" function then you could assign the short key press to that app and regain the native function, so I learned how to write an app for Android that would do that. It worked so I then wrote apps for the "Phone" and "Map" buttons. Each app just launches the built in function (Android terminology is "Activity") and then exits. I also did an app to launch the eco trip computer (Info->Trip Computer), and the wallpaper clock (Info->Clock/Wallpaper). These are for cars with the Display Audio system, and the launchMap app is for models that have the built in Garmin navigation system. And of course use at your own risk. You can also disable the restore last function in Honda Hack (which I found doesn't work that well), and select one of these apps to run at startup if you always want to start in one of the corresponding functions.
Do you have the source on github or somewhere? I'd love to see how you did it and then potentially expand on the concept.
 
OP
OP

rwsmith123

Senior Member
First Name
Richard
Joined
Jan 24, 2018
Threads
12
Messages
357
Reaction score
309
Location
Raleigh, NC
Vehicle(s)
2019 Honda Civic Sport Touring
Country flag
No, what I did was pretty simple though. In Android Studio, create a new empty activity. This is what I added to the MainActivity for launching the audio app:

Code:
        Intent intent = new Intent(Intent.ACTION_MAIN);
        intent.setComponent(new ComponentName("com.mitsubishielectric.ada.app.avplayer","com.mitsubishielectric.ada.app.avplayer.activity.AvPlayerMainActivity"));
        startActivity(intent);
        finish();
I commented out the line for setContentView

I replaced styles.xml with this to so there would be no visible window:
Code:
<style name="Theme.Transparent" parent="android:Theme">
        <item name="android:windowIsTranslucent">true</item>
        <item name="android:windowBackground">@android:color/transparent</item>
        <item name="android:windowContentOverlay">@null</item>
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowIsFloating">true</item>
        <item name="android:backgroundDimEnabled">false</item>
    </style>
I used an app called ActivityLauncher to find out what activities to use.
For the map: com.honda.displayaudio.navi.NaviActivity
For the phone: com.mitsubishielectric.ada.app.hft.HftPhoneMenuActivity
Fuel Economy: com.mitsubishielectric.ada.app.ecotripcomputer.EcoTripComputerActivity
Clock Wallpaper: com.mitsubishielectric.ada.app.dalauncher.InfoClockActivity
 

carl4

Senior Member
First Name
carl
Joined
Jan 20, 2019
Threads
3
Messages
95
Reaction score
34
Location
milwaukee
Vehicle(s)
2019 civic si
Country flag
No, what I did was pretty simple though. In Android Studio, create a new empty activity. This is what I added to the MainActivity for launching the audio app:

Code:
        Intent intent = new Intent(Intent.ACTION_MAIN);
        intent.setComponent(new ComponentName("com.mitsubishielectric.ada.app.avplayer","com.mitsubishielectric.ada.app.avplayer.activity.AvPlayerMainActivity"));
        startActivity(intent);
        finish();
I commented out the line for setContentView

I replaced styles.xml with this to so there would be no visible window:
Code:
<style name="Theme.Transparent" parent="android:Theme">
        <item name="android:windowIsTranslucent">true</item>
        <item name="android:windowBackground">@android:color/transparent</item>
        <item name="android:windowContentOverlay">@null</item>
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowIsFloating">true</item>
        <item name="android:backgroundDimEnabled">false</item>
    </style>
I used an app called ActivityLauncher to find out what activities to use.
For the map: com.honda.displayaudio.navi.NaviActivity
For the phone: com.mitsubishielectric.ada.app.hft.HftPhoneMenuActivity
Fuel Economy: com.mitsubishielectric.ada.app.ecotripcomputer.EcoTripComputerActivity
Clock Wallpaper: com.mitsubishielectric.ada.app.dalauncher.InfoClockActivity
Nice! Thanks. I'm ashamed to be a software engineer and haven't yet written an android app!
 
OP
OP

rwsmith123

Senior Member
First Name
Richard
Joined
Jan 24, 2018
Threads
12
Messages
357
Reaction score
309
Location
Raleigh, NC
Vehicle(s)
2019 Honda Civic Sport Touring
Country flag
Don’t feel bad, I’m an embedded software engineer and I just started poking around with Android. I’ve spent hours in my parked car digging around the HU with terminal emulator, with the car running for AC and so I don’t kill the battery, my neighbors must think I’m nuts.
 

carl4

Senior Member
First Name
carl
Joined
Jan 20, 2019
Threads
3
Messages
95
Reaction score
34
Location
milwaukee
Vehicle(s)
2019 civic si
Country flag
Don’t feel bad, I’m an embedded software engineer and I just started poking around with Android. I’ve spent hours in my parked car digging around the HU with terminal emulator, with the car running for AC and so I don’t kill the battery, my neighbors must think I’m nuts.
That battery life... ugh!
Sponsored

 


 


Top