[Discontinued] AppSwitcher - smart SWC launcher (for Junsun, Xtrons and similar devices) incl. autostart

Search This thread

TorstenH

Senior Member
Feb 20, 2021
2,386
617
t.me
Realme GT 2 Pro

AppSwitcher

SWC (Steering Wheel Control) app launcher

This thread gets continued here

ic_launcher_adaptive_fore.png

Stay focused on the street and don't touch the head units display to switch between apps.


61e11e22d8ff4a5b4a1b3346_Supportbutton-1.png
Support the development of this free app via
ko-fi.com/appswitcher


Please note: This app is developed and tested only on Junsun V1 Pro with MTK825X AND MT8667 CPU. You can test on other devices and let me know if it works...
One user reported usage on Xtrons unit - so give it a try.




User Interface:

IMG_20230218_103534.jpg

Covered features:
- allow to select an app to start without the need to jump from app to app.
- one button press to switch between last used navigation app and last used media app.
- support usage of multiple navigation apps.
- works with pre-installed apps like Radio and apps added by the user.
- start the last used media app automatically.
- long button press to cancel (if dialog is shown) or to jump to home screen.
- reactivate accessibility service of Automate and start initial Automate Flow
- enable/disable DuraSpeed
- change system property to make Android status bar visible (work as on other Android devices)
- automatic screen dimming based on sunset / sunrise information
- allows to start the (Junsun) equalizer app
- Supports Mtk8257 and 8667 devices. Thank you @Jetblack31 for your testing engagement on 8667.


Feedback on the web
Unfortunately the author only picks up one specific aspect of the app.
IMG_20230401_193710.jpg

Testers are welcome! I need YOUR help and your feedback. Don't be a stranger!

Please install both apps
because 'AppSwitcher Starter' is just used to start the App Switcher Service. Find installation instruction in 3rd post.

FAQ
https://forum.xda-developers.com/t/...sun-and-similar-devices.4435555/post-86825555
 

Attachments

  • AppSwitcher Starter.apk
    3 MB · Views: 1,761
  • ic_launcher_adaptive_fore.png
    ic_launcher_adaptive_fore.png
    28.3 KB · Views: 5,785
  • AppSwitcher_2.7.5.apk
    5.6 MB · Views: 415
Last edited:

TorstenH

Senior Member
Feb 20, 2021
2,386
617
t.me
Realme GT 2 Pro
versions > 2.7.5
here

version 2.7.5
Fixed bugs:
- AppSwitcher detected itself as current foreground app and suggests all apps including the one which is behind the AppSwitcher dialog

version 2.7.4
Whats new:
- new setting "Dialog\Equalizer" which allows to show a button to open the head units equalizer
- fixed dialog flickering. It's not required anymore to enable "Others\Disable navi start activity" to avoid flickering of the dialog

version 2.7.3
Whats new:
- sound on key press (can be disabled in "Dialog" settings section)
- added "Restore LTE connection" which helps to re-establish 4G connection after sleep. Only for MTK825X devices.
- "On button press log entry" and "Long button press log entry" can be emptied, no dummy entries are required. E.g. if users with can box only want to configure "Short button press log entry".
- several stability/reliability optimizations, better dialog performance (especially directly after reboot of MTK825X devices)

Fixed bugs:
- uninstalling a selected media/navigation app leads to crash of AppSwitcher
- the dialog may skip entries on subsequent keystrokes after SWC key gets pressed quickly several times

version 2.7
Whats new:
- new setting "Screen\Landscape overlay" which forces all apps to run in landscape orientation. This fixes the appearance issue of Spotify (and other apps like Tidal and Apcoa Flow) after disabling "Screen\Forced fullscreen system property".
- "Apps and activities\Set media apps/activities" offers all exported activities, now. This allows to start a specific screen of your app.
- optimized switch dialog performance and countdown sync.
- adjusted color of settings button
- optimized app starts (actively by user and after countdown)
- "Dialog\Grayscale app icons" is enabled by default (after fresh installation)
- run of media app gets skipped if SWC button gets pressed. Only relevant if "Autostart\Delay (seconds) before start of media app" is set.
- click on AppSwitcher status bar notification opens settings screen
- code cleansing and other code optimizations/simplifications
Fixed bugs:
- App crashes when settings are changed after service is stopped
- Dialog does not disappear when user clicks on settings button
- set delay of media activity freezes app start

version 2.6.25alpha
What's new:
- fixes bug: "Forced fullscreen system property" not applied. Only relevant for Mtk8257 devices
Please uninstall previous version before installing. Thank you for reporting this bug.
- new dialog setting "Grayscale app icons"
Screenshot_2023-03-11-11-00-13-56_508eb4fa400729517800037bda6bc0d3.jpg
IMG_20230309_113111.jpg

version 2.6.24alpha
What's new:
- supports sleep mode
https://forum.xda-developers.com/t/...-devices-incl-autostart.4435555/post-88168463
- enabled GPS provider if coarse location can't get retrieved
- added "always show launcher on 2nd position
- reorganized settings menu
- several bug fixes and improvements
- re-coded permission checks and self authorization
- implemented fix to avoid crash on older Android versions while retrieving location
- reworked screen dimming
- optimized log reader and derivation of current foreground app

version 2.6
What's new:
- added display dimming feature. Tap on title of dialog to show the button to switch between the modes: no dimming, always and automatic
- added option to start media app twice which can fix issues if media app stuck on launch
- several bug fixes and code improvements
Please note: If installation fails, uninstall AppSwitcher first and try again.

version 2.1

Whats new:
- allow to disable 'Smart list' and use a static list instead. Manual re-order by user possible.
- delay before last used media app gets started automatically
- minor bug fixes but massive code changes to realize the new features.
Please clear app storage or uninstall previous version to avoid force close if you currently use version <= 1.9. Sorry for that!

version 1.9

Whats new:
- added setting to disable forced fullscreen for non-stock apps. Please reboot the system after changing the setting

version 1.8
Whats new:
- last used navigation app was not offered as 1st navigation app in all circumstances

version 1.7
Whats new:
- added option to enable Automate Accessibility Service on service start
- added option to start Automate Flow on service start
IMG_20220712_092200.jpg
- performance optimizations by moving tasks to background class

version 1.5
Whats new:
- added option to disable DuraSpeed (see FAQ)
- distance between app icons unified to give UI a cleaner look (see screenshot in 1st post)
- fixed screen flickering when manually scroll on / touching the UI
- some smaller code optimizations

version 1.4
Whats new:
- bug fix: touching the ui leaves last entry in the dark.
- bug fix: setting screen not updating after change of 'short button press log entry'
- performance optimization: evaluation of concrete log entry moved to background class.


version 1.3
Whats new:
- bug fix: current navigation app offered to select although it already runs in foreground.
- new clean b/w UI. Degree of graying adjustable via settings.
- shows clock which can be disabled via settings.
- considering "push down" of SWC button (setting 'on button press log entry') which allows to leave the dialog with long press although delay is set to a short time period.
- minor bug fixes and code optimizations
Please clear app storage or uninstall previous version to avoid force close. Sorry for that!

version 1.2

Whats new:
- bug fix: In rare cases the app closes while dialog is still present. After this the app doesn't come up again.

version 1.1 alpha
Whats new:
- cleaner settings menu
- swipe on dialog or tap outside of app icons to show button for settings

- performance improvements
Please clear app storage or uninstall previous version to avoid force close. Sorry for that!
 
Last edited:
  • Like
Reactions: Sol169

TorstenH

Senior Member
Feb 20, 2021
2,386
617
t.me
Realme GT 2 Pro
Installation/configuration on Junsun V1 pro:

I know real men don't need to read manuals but have a look before asking stupid questions. ;-)

- Install both! apps ('AppSwitcher' and 'AppSwitcher Starter')
- Enable automatic start of navigation app in factory settings and let your device reboot
IMG_20220427_080857.jpg
- Open app 'AppSwitcher' and select your navigation and multimedia apps'
- Set 'AppSwitcher Starter' as navigation app:
IMG_20220428_093246.jpg
- Configure one button of steering wheel to start navigation app (if not already done)
IMG_20220428_094427.jpg
- Optional, if you're using not the stock launcher: Add 'AppSwitcher Starter' to autorun. This will start AppSwitcher even if the head unit misses to start the navigation app after sleep. This step is optional and shouldn't be required.

--> Basic configuration completed

Further settings

Run media app on service start:
Last used media app will be started as soon as 'AppSwitcher Service' gets started. Exception: Another media app or navigation app is already in foreground.

FAQ
Post in thread 'AppSwitcher - smart SWC launcher (for Junsun and similar devices)' https://forum.xda-developers.com/t/...sun-and-similar-devices.4435555/post-86825555
 
Last edited:
  • Like
Reactions: Sol169

TorstenH

Senior Member
Feb 20, 2021
2,386
617
t.me
Realme GT 2 Pro
Is it for 8227L chipset mtk devices ?
It is not tied to a specific chipset. The app reads the device log to identify if the steering wheel button was pushed.
So you could check that with a device log reader app like Logcat.


On Junsun devices you can find a entry with TAG 'MainUI' and message 'nDealPkey = = xxx' for each button press in the log.
 

Pylotis

New member
Apr 20, 2022
3
2
Please excuse my scepticism.
How can we make sure that your application is safe?
1. The application is not on Google Play.
2. The code is not open source.
3. You have no link to a repository.

Other than that, great idea keep up the good work.

A functionality for trying to connect to the latest wifi hotspot, or to try all previous used networks?
 

TorstenH

Senior Member
Feb 20, 2021
2,386
617
t.me
Realme GT 2 Pro
Please excuse my scepticism.
How can we make sure that your application is safe?
1. The application is not on Google Play.
2. The code is not open source.
3. You have no link to a repository.

Other than that, great idea keep up the good work.

A functionality for trying to connect to the latest wifi hotspot, or to try all previous used networks?
Thank you for your feedback. You're right but I just started with Android app development recently. Github will come, PlayStore maybe never. In meantime feel free to use an (online) decompiler as you would have to do for a lot of apps provided here on Xda. On the other side be sure the Chinese pre-installed enought risky stuff on the head units.

I thought about the possibility to trigger system scan for wifi networks to get the internet connection faster.
 
  • Like
Reactions: Pylotis

TorstenH

Senior Member
Feb 20, 2021
2,386
617
t.me
Realme GT 2 Pro

idea.png

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:
IMG_20220429_164055.jpg

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:
Code:
 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...
...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.
 
Last edited:

st3v4nt

Member
Nov 6, 2011
29
7
Hi Thorsten, I found your app through your reply in other thread regarding fyt. I test it on teyes cc3, it works as you describe. I assign the 3rd party dvr app to steering switch long press. However I wonder if next version could be expanded to not only replace navi app/button but other button/function as well, or when assigned button press it will cycle to different apps. And one more thing I’m pretty sure I downloaded the latest version of your app but the app info still showing version 1.3 instead version 1.4. Thank you for the app.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 9

    AppSwitcher

    SWC (Steering Wheel Control) app launcher

    This thread gets continued here

    ic_launcher_adaptive_fore.png

    Stay focused on the street and don't touch the head units display to switch between apps.


    61e11e22d8ff4a5b4a1b3346_Supportbutton-1.png
    Support the development of this free app via
    ko-fi.com/appswitcher


    Please note: This app is developed and tested only on Junsun V1 Pro with MTK825X AND MT8667 CPU. You can test on other devices and let me know if it works...
    One user reported usage on Xtrons unit - so give it a try.




    User Interface:

    IMG_20230218_103534.jpg

    Covered features:
    - allow to select an app to start without the need to jump from app to app.
    - one button press to switch between last used navigation app and last used media app.
    - support usage of multiple navigation apps.
    - works with pre-installed apps like Radio and apps added by the user.
    - start the last used media app automatically.
    - long button press to cancel (if dialog is shown) or to jump to home screen.
    - reactivate accessibility service of Automate and start initial Automate Flow
    - enable/disable DuraSpeed
    - change system property to make Android status bar visible (work as on other Android devices)
    - automatic screen dimming based on sunset / sunrise information
    - allows to start the (Junsun) equalizer app
    - Supports Mtk8257 and 8667 devices. Thank you @Jetblack31 for your testing engagement on 8667.


    Feedback on the web
    Unfortunately the author only picks up one specific aspect of the app.
    IMG_20230401_193710.jpg

    Testers are welcome! I need YOUR help and your feedback. Don't be a stranger!

    Please install both apps
    because 'AppSwitcher Starter' is just used to start the App Switcher Service. Find installation instruction in 3rd post.

    FAQ
    https://forum.xda-developers.com/t/...sun-and-similar-devices.4435555/post-86825555
    3
    Added version 2.6.14alpha which is the most stable version so far.

    Thanks to @Jetblack31 for his testing engagement

    Even the version is not final, I removed all previous versions on first post because they may lead to a bootloop on 8667 devices.

    As always: please provide your feedback. Not only but also in case of issues. Friendy user feedback is my motivation to continue this project...
    3
    Attached AppSwitcher version 2.7 to first post...


    Whats new:
    - new setting "Screen\Landscape overlay" which forces all apps to run in landscape orientation. This fixes the appearance issue of Spotify (and other apps like Tidal and Apcoa Flow) after disabling "Screen\Forced fullscreen system property".
    - "Apps and activities\Set media apps/activities" offers all exported activities, now. This allows to start a specific screen of your app.
    - optimized switch dialog performance and countdown sync.
    - adjusted color of settings button
    - optimized app starts (actively by user and after countdown)
    - "Dialog\Grayscale app icons" is enabled by default (after fresh installation)
    - run of media app gets skipped if SWC button gets pressed. Only relevant if "Autostart\Delay (seconds) before start of media app" is set.
    - click on AppSwitcher status bar notification opens settings screen
    - code cleansing and other code optimizations/simplifications

    Fixed bugs:
    - App crashes when settings are changed after service is stopped
    - Dialog does not disappear when user clicks on settings button
    - set delay of media activity freezes app start
    2
    Didn't see this mentioned; if someone has problems setting this up on Junsun V1 Pro w/ canbus, I had to give AppSwitcher permission to "READ_LOGS" with ADB. Now works great!