[Android Head-Units] TorstenH:
Attached app FlowStarter.apk allows to start an Automate flow (https://llamalab.com/automate/) which has to be defined in file flowstarter.cfg

Required steps:

1. Install the apk.

2. Extract the file flowstarter.cfg to the internal storage (root, no subfolder)

3. Copy the URI of the Automate flow into the file flowstarter.

View attachment 5274647

4. Set FlowStarter as navigation app in the Android settings.

5. Assign a button of your steering wheel to GPS

View attachment 5274649

AppStarter.zip contains a sample flow. Use this for for testing because you can use it with the free version of Automate.

You just have to maintain the list of apps:

View attachment 5284717

You can find the package names with the app QuickShortcutMaker:

View attachment 5280545

Don't change the keys/texts "Navi" and "Home" but set the package names of your launcher and your navigation app. Add and change the entries for your multimedia apps (Blackplayer, Podcast, Radio, Bluetooth and DAB-Z are only samples).

{"Home": ["altergames.carlauncher"],
"Navi": ["com.alk.copilot.mapviewer"],
"DAB-Z": ["com.zoulou.dab", "IGNORE"],
"BlackPlayer": ["com.kodarkooperativet.blackplayerex"],
"Podcast": ["com.bambuna.podcastaddict", "com.bambuna.podcastaddict"],
"Bluetooth": ["com.ts.MainUI", "com.ts.bt"],
"AUX": ["com.ts.MainUI", "com.ts.main.avin2.AuxMainActivity"],
"Radio": ["com.ts.MainUI", "com.ts.main.radio.RadioMainActivity"],
"HU reloaded": ["gb.xxy.hr"],
"EasyConn": ["net.easyconn"],
"AutoLink": ["com.suding.speedplay"],
"DAB": ["com.ex.dabplayer.pad", "IGNORE"]}

You can set the activities which should be considered as second parameter. "com.ts.bt" includes all activities starting with com.ts.bt.

Alternatively you can use IGNORE as second parameter which will start the app just with package name.

FlowStarter.apk is now starting Automate accessibility service if it's not running. You can add FlowStarter to autostart in you launcher (e.g. Agama).

On Junsun V1 pro:

You can set autostart of Navi in factory settings (code 8878, section Others). Please note that you have to re-set FlowStarter as navigation software after first reboot.

Let me know if it works on your device. I tested on a Junsun V1.

How the sample flow works:

- Single press will open navigation if no media app was launched before.

- Single press will open home if navigation is in foreground and no media app was launched before.

- Single press will switch between media app and navigation if a media app was started.

- Double press will always open home.

2022/03/20: Updated FlowStarter.apk. In some cases the apps seem to not stop completely. This may improve reliability.

2021/04/11: Updated the flow. Now the current activity is considered for the media app. This is important for the Junsun BT Music App to switch back to music control and not to the device connection screen.

2021/04/12: Configuration file now with file extension .cfg. Added error handling in FlowStarter.apk.

2021/04/15: Corrections in sample flow. Now the last activity of an app is captured correctly. In case flow can't launch activity (activity only app internal) previous activity gets started.

2021/04/16: Updated sample flow. Now it's possible to define activity which has to be considered.

2021/04/19: Added advanced flow AppStarter_with_ServiceRestart.zip

2021/04/30: FlowStarter.apk can now launch several flows. Just add additional lines to flowstarter.cfg

2021/05/10: FlowStarter.apk starts accessibility service if required.

2021/05/32: Removed AppStarter_with_ServiceRestart.zip because FlowStarter.apk starts the service if needed.

Updated AppStarter.zip

2021/10/21: Added keyword IGNORE to app list which solves the problem an app can't be started because the app doesn't exposes its activities. IGNORE can also be used to start an app always just with package name.