[Android Head-Units] TorstenH:
View attachment 5883085​

FAQ​

Why is the starter a separate apk?

Junsun head units check if the navigation app package is already in foreground. If that's the case home screen gets displayed. If we set 'AppSwitcher' as navigation app it would not stay in foreground. Here the relevant coding of MainUI:

View attachment 5603253

What does the different log listener log entries mean?

AppSwitcher is listening to different log messages of the Android system log. We need not the enter the whole message, a substring is sufficient. But we need to consider spaces.

- Short button press log entry

The most important log entry. If this gets recognized the AppSwitcher dialog gets opened or the next app to start gets highlighted.

On some head units we can use the message which gets written after we release the SWC key after a short period of time.

- On button press log entry

This message will only stop the countdown and AppSwitcher is waiting for the next configured log entry.

Usually we configure a log message which gets written as soon as we push down the SWC key.

- Long button press log entry

AppSwitcher will return to home screen or close (cancel) the dialog.

If possible we configure a message which gets written when we release the SWC key after a long period of time.

What is DuraSpeed?

DuraSpeed is a proprietary tool from MediaTek restricting and closing(!) background apps and services to free memory and so to make it available for starting apps.

AppSwitcher can set the properties to turn DuraSpeed off in case you're struggling with closed services / apps and want to give back control to Android.

AppSwitcher dialog isn't shown

On some head units you have to provide permissions manually. According to my experience on a Junsun V1 pro (with MTK8259/MTK8257 CPU) the authorizations granted automatically.

1. Ensure that the AppSwitcher service is running. We should see the AppSwitcher icon on top of the status bar and a notification in the status bar.

2. Check if AppSwitcher has permission to appear on top of other apps. You can provide the authorization in "application settings".

3. On some head units AppSwitcher doesn't get authorization to read the Android log. In this case you have to grant authorization via ADB:

adb shell pm grant com.thf.AppSwitcher android.permission.READ_LOGS

How display dimming works

Screen dimming is realized by "painting" a semi-transparent overlay on top of the screen because we don't have the possibility to access display brightness on system level.

Some apps don't like to get overlayed and so Google PlayStore shows a warning message. AppSwitcher is pausing the overlay if Google PlayStore is the app in foreground.

If you're using an app which doesn't work well whiles it's overlayed, let me know.

What is Automate?

Automate is a powerful alternative to Tasker...

Automate for Android ⋅ LlamaLab

Create flowcharts that make your Android smartphone or tablet perform tasks automatically.

llamalab.com

...which allows to execute tasks, start apps, change settings, change connectivity (wifi, hotspot, Bluetooth,...) and much more.

Unfortunately our head units are killing the Automate service during sleep and not enabling it after reboot.

AppSwitcher can re-enable the Automate service and trigger an Automate flow.