AppSwitcher - smart SWC launcher (for Junsun and similar devices) incl. autostart

Search This thread

TorstenH

Senior Member
Feb 20, 2021
779
176
Added new version 1.9. Fasten you seat belt before you read what's new:

- added setting to disable forced fullscreen for non-stock apps. Please reboot the system after changing the setting.
If disabled, the status bar gets displayed on top of non-stock apps and behaves as intended by Google. You can use one of the immersive mode apps from Google PlayStore to control fullscreen display on application level.


All thanks goes to: @demolite
Thank you very much for your amazing engagement!


See the history of pain in
https://forum.xda-developers.com/t/junsun-v1-rescue-the-status-bar.4306249
 
  • Like
Reactions: alternativ

TorstenH

Senior Member
Feb 20, 2021
779
176
Version 2.0 will allow to...
- hide status bar while dialog gets shown.
- define a delay (in seconds) before last used media apps get started.
This may help to allow a start of media apps which requires ready system resources like USB connection.
 
  • Like
Reactions: ramig

demolite

Member
Aug 8, 2022
31
11
I have a few suggestions.

The first one was already mentioned but maybe it could be an option.

-Custom static order of apps on the list. Maybe even that it would start from beginning or last selection depending on preference. On my cars original radio the mode button went through radio-cd-aux-usb in a set pattern so I didn't have to look at the display. Now I have to mostly look.

-More/adjustable contrast between selection icons. In sunlight it's hard to see what is selected.


This app is great, and these are my only problems with it.
 
  • Like
Reactions: TorstenH

TorstenH

Senior Member
Feb 20, 2021
779
176
I have a few suggestions.

The first one was already mentioned but maybe it could be an option.

-Custom static order of apps on the list. Maybe even that it would start from beginning or last selection depending on preference. On my cars original radio the mode button went through radio-cd-aux-usb in a set pattern so I didn't have to look at the display. Now I have to mostly look.
1x: switch between navi and media app
2x: switch to media app you used before last used media app.

A static list would mean you have to press the swc button several times just because you want to have a quick look on the media app to press again x times just to go back to the navigation app. That's the reason I don't like the simple cycle trought a static list and why the selection of media and navigation apps are separate settings. And I don't want to see the podcast app opening although I'm currently no interested in.

You see, I'm not convinced or I didn't get your point ;-)
-More/adjustable contrast between selection icons. In sunlight it's hard to see what is selected.
There is a setting called 'brightness of not selected items". You tried to adjust this?
This app is great, and these are my only problems with it.
Thank you very much. I'm happy to hear that. Maybe you can give me more details to your "static list" idea and why it's really better to click 5 times and then 4 times to switch between two apps. :)
 

demolite

Member
Aug 8, 2022
31
11
There is a setting called 'brightness of not selected items". You tried to adjust this?

How could I have missed this :D

Thank you very much. I'm happy to hear that. Maybe you can give me more details to your "static list" idea and why it's really better to click 5 times and then 4 times to switch between two apps. :)

All I can say is for me it's for muscle memory. I'm not saying it's for everyone, but I jump around a lot on the apps, and this, although intuitive, is not for me. Think of this like if the keys on your keyboard arranged themselves to predict your next letter, so you would have to look at what you are typing. And it would only be 4 and 5 button presses if you put the items to the 4th and 5th place. Atleast one other person has suggested this so maybe I'm not alone on this.
 

TorstenH

Senior Member
Feb 20, 2021
779
176
@demolite @Apk07

Started to implement that static list feature. Because I have to change a lot of classes I hope you will provide your test feedback.

IMG_20220816_154012.jpgIMG_20220816_153937.jpg
 
  • Like
Reactions: ramig and demolite

Apk07

Senior Member
Dec 23, 2007
311
80
Michigan
Had to factory reset my HU after messing with OTA's, so I lost AppSwitcher for now.
When you release the next version I'll be sure to grab it.

Couple questions-
Is there anything preventing you from releasing it on the Play Store or elsewhere? I'd love to be able to update it automatically. I know they can be picky on permissions and packaging it into an App Bundle, but it's not nearly as awful as iOS apps.

If the HU automatically switches to ZLink or a similar Android Auto/CarPlay app, is the AppSwitcher service tracking the current app that's in the foreground? (Since it wasn't "switched to" by AppSwitcher, but another process)
 

TorstenH

Senior Member
Feb 20, 2021
779
176
@demolite @Apk07

I added version 2.0a. I just was able to preform some basic tests on my phone. So I apologize for any bugs.
I had to change the object type used to store selected navis and media apps internally so it may be better to clear app data to prevent force closes. Sorry!
 

TorstenH

Senior Member
Feb 20, 2021
779
176
Had to factory reset my HU after messing with OTA's, so I lost AppSwitcher for now.
When you release the next version I'll be sure to grab it.

Couple questions-
Is there anything preventing you from releasing it on the Play Store or elsewhere? I'd love to be able to update it automatically. I know they can be picky on permissions and packaging it into an App Bundle, but it's not nearly as awful as iOS apps.
Already thought about that but after I read that I need to pay for a developer account I stopped reading. 😅
Maybe an approach could be to add an update functionality inside the app.
If the HU automatically switches to ZLink or a similar Android Auto/CarPlay app, is the AppSwitcher service tracking the current app that's in the foreground? (Since it wasn't "switched to" by AppSwitcher, but another process)
Yes and no. AppSwitcher tracks the current foreground app even you started it by yourself (or another app like Tasker or Automate started the app).
But what's happening inside ZLink or it's pendants is just a black box.
 

demolite

Member
Aug 8, 2022
31
11
I tried 2.0a but for some reason only the first list item gets selected over and over. Like the app restarted every time and forgot where it was.

I went back to 1.9 and it works, but ofcourse no static list.
 

TorstenH

Senior Member
Feb 20, 2021
779
176
I tried 2.0a but for some reason only the first list item gets selected over and over. Like the app restarted every time and forgot where it was.

I went back to 1.9 and it works, but ofcourse no static list.
Strange because this is something I tested on my phone. Have to test on my Junsun tomorrow.
Can you push the button multiple times to jump trought the list?
 

demolite

Member
Aug 8, 2022
31
11
Strange because this is something I tested on my phone. Have to test on my Junsun tomorrow.
Can you push the button multiple times to jump trought the list?

No I can't go to any other selection. Every button press is like the app restarted. First item selected and timer restarted. I also notice that the list dissappears for a fraction of a second (like old instance goes away and new starts up).

On 1.9 I see no "disappearance" and list just advances smoothly.
 

demolite

Member
Aug 8, 2022
31
11
2.0a --> 2.0b
Start of AppSwitcher Service wasn't possible if app data was cleared.
I only had a little time to test, but I couldn't get the list to open at all now. I get the "starting service" on startup but no list on button press. I also tried adding the read_logs-permission manually. Have you tried on your headunit?
 

TorstenH

Senior Member
Feb 20, 2021
779
176
I only had a little time to test, but I couldn't get the list to open at all now. I get the "starting service" on startup but no list on button press. I also tried adding the read_logs-permission manually. Have you tried on your headunit?
Have you deleted app data? Is AppSwitcher icon visible on status bar and is it still there after pressing the button?
 

demolite

Member
Aug 8, 2022
31
11
Have you deleted app data? Is AppSwitcher icon visible on status bar and is it still there after pressing the button?
Appswitcher icon is on status bar and in notification shade "service is running".
I cleared all data and also tried uninstalling. I think it can't read the logs, but I will try to solve it later. Does it work on your unit?
 

TorstenH

Senior Member
Feb 20, 2021
779
176
I only had a little time to test, but I couldn't get the list to open at all now. I get the "starting service" on startup but no list on button press. I also tried adding the read_logs-permission manually. Have you tried on your headunit?
Have you deleted app data? Is AppSwitcher icon
Appswitcher icon is on status bar and in notification shade "service is running".
I cleared all data and also tried uninstalling. I think it can't read the logs, but I will try to solve it later. Does it work on your unit?
Had no time to do checks on the hu. Log reading classes are unchanged and usually the head unit grants all permissions.
 

demolite

Member
Aug 8, 2022
31
11
Have you deleted app data? Is AppSwitcher icon

Had no time to do checks on the hu. Log reading classes are unchanged and usually the head unit grants all permissions.
And even after manually granting the permission it doesn't work. I had this issue earlier because of the permissions, but now it must be something else.

EDIT: It started to work! I had the hu off for some time and now it works like it should.

EDIT 2: I also had AppSwitcher crash (not while using the list), after which the system became unresponsive and rebooted.
 
Last edited:

TorstenH

Senior Member
Feb 20, 2021
779
176
And even after manually granting the permission it doesn't work. I had this issue earlier because of the permissions, but now it must be something else.

EDIT: It started to work! I had the hu off for some time and now it works like it should.
I meantime it tested it on my hu and it works. Good to hear it's running on your device, too.

But maybe the static list is to static. Should the current item + 1 be selected based on the current background app? On the other side it's less muscle memory and you don't know how often to press the button? I will wait for your feedback because I still don't like the static list. 🤣

The fullscreen option for the dialog will be removed because it's not looking nice to see the current foreground app changing size. Pain in my eyes.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Hi,
    I've logged the SWC. So regarding the previous posts, it should work fine. I'll keep you posted !
    Jetblack
    IMG_7545.jpg


    By the way, it seems I don't have "long press feature" through the canbus decoder. So I will set another key for the long press. That's not an issue, there are so many keys on Renault SWC !
    TorstenH, thank you so much for your amazing and brilliant software development!
    1
    Thank you for your help. For the moment I have a problem. It does not work. I set AppSwitcher like in the picture but with no results. When I press the mode key (key 10), the HU keeps its native behavior, i.e. changing the source.

    View attachment 5709251

    Some notes :
    I had to enable READ LOGS for logcat to run properly, perhaps AppSwitcher is not granted with enough permissions to read the logs ?
    When I set AppSwitcherStarter as NAVI app, each time I reboot the HU, the NAVI app goes back to Maps. So I put AppSwitcherStarter as an autorun app in AGAMA car launcher.
    Thank you very much for you help !
    Jetblack

    EDIT : for long press, I have no supplementary log for "CanNative". For some keys, like vol+ vol-, if I long press then the message ky pressed is repeated each second.
    You could try to grant the permission. On my Junsun V1pro that was not needed wherby one user already mentioned that he had to grant the permission.

    Unfortunately then the head unit doesn't provide the long press information and for AppSwitcher we don't have a trigger.
    1
    I'm new in Android, could you give me the command line to grant the proper permission to AppSwitcher ?
    Many thanks!
    Should work similar to Logcat Reader:

    Code:
    adb shell pm grant com.thf.AppSwitcher android.permission.READ_LOGS
    1
    Should work similar to Logcat Reader:

    Code:
    adb shell pm grant com.thf.AppSwitcher android.permission.READ_LOGS
    Thanks ! I try now !
    1
    You could try with another navigation software from Google PlayStore to check if it's a specific problem with AppSwitcherStarter on your device.

    Please be aware that USB storage devices can prevent the head unit from saving settings. And as soon as you change factory settings (8888 / 8878) the navigation app will be changed back to Maps automatically which is imho a bug.
    Thank you very much, I will try what you suggest in your 2 messages and I keep you posted !
  • 3
    AppSwitcher - SWC (Steering Wheel Control) app launcher.

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


    UI:
    IMG_20220623_095831.jpg

    Video of 1st alpha version:


    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)

    Open:
    - May not work on devices with canbus.

    Testers are welcome! I need YOUR help to make it work on head units connected to canbus.

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

    FAQ

    2
    @demolite @Apk07

    Started to implement that static list feature. Because I have to change a lot of classes I hope you will provide your test feedback.

    IMG_20220816_154012.jpgIMG_20220816_153937.jpg
    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!
    2
    2.0a --> 2.0b
    Start of AppSwitcher Service wasn't possible if app data was cleared.
    2
    Added version 1.4.
    Only minor changes but the UI bug was too painful for my eyes. (-: