yashsingh1/xdaforums huggingface dataset:
[Android Head-Units] ciorapel:
I think you misunderstood what I've meant. If I have the option to auto-start last used media app in ”Appswitcher”, maybe it would make more sense to make the ”last used navi app” the first option in appswitcher. Right now, appswitcher has this look on cold start:

”My last used media app / Last used navi app / Media app 2 / Media app 3 / Navi app 2 / Navi app 3”

The appswitcher is configured to auto-open the last media app, so with the media app opened (automatically), if I press once to switch apps, the first option is selected in Appswitcher witch is ... the app that I already have fullscreen. I have to press twice for selecting the navi app.

What it would be a nice change is that, if I have ”open last used media app” option in Appswitcher, the menu should look like this:

”My last used navi app / Media app # / Media app # .. etc.”

In the first example, after switching to either navi or media app (even the media app that is already opened), everything works as intended, because appswitcher knows the last switch in the apps.

In the second example, Appswitcher can interpret that, if the option to auto-launch last used media app is selected, that the last used app is the media app, and should give navi app as the first option in list.

Thank you @TorstenH
[Android Head-Units] TorstenH:
I see your point and it would be a possible partial solution. But it hurts to implement this to work around the head units bug. If the user is fast and returns to home screen, navigation app will be suggested (in case usage statistics are still not ready) .

Do you have a MTK825X device?

On the other side I have here a (not fully tested!) version 2.7.1 which contains an optimized usage stat util. Let me know if you want to give it a try...
[Android Head-Units] ciorapel:
Yes. 4/128

Sure, waiting for your apk.
[Android Head-Units] TorstenH:
The firmwares from end 2022 or latest from 2023 are performing better than the first versions. Depending on your firmware an update may IMPROVE overall system performance.

Can be found in your private messages.
[Android Head-Units] TorstenH:
Identified bug in latest version 2.7:

- If you press the SWC key quickly several times, the dialog may skip entries on subsequent keystrokes.

Happens on slow head units.

- Uninstalling a selected media/navigation app leads to crash of AppSwitcher.
[Android Head-Units] TorstenH:
An AppSwitcher user complaint why AppSwitcher dialog is disappearing on each press of the SWC key...

Solution:

Latest AppSwitcher version stays in foreground and below description is obsolete, now.

Simply enable this option in section Others

Details can be found here:

https://xdaforums.com/t/appswitcher...-devices-incl-autostart.4435555/post-86825555
[Android Head-Units] TorstenH:
Next version is on the way. What you can expect:

- 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 bug:

- Uninstalling a selected media/navigation app leads to crash of AppSwitcher.
[Android Head-Units] TorstenH:
On MTK825X devices you can put AppSwitcher to the "White list" of Quickbootmanager by using JunsunSleepConfigurator:

JunsunSleepConfigurator

JunsunSleepConfigurator On Junsun V1 (pro) devices apps get killed before head unit enters sleep mode. So you have to restart the apps every time you continue your ride. The file /vendor/etc/qb_list.xml defines which apps should be just...

xdaforums.com

This allows AppSwitcher to survive sleep mode. AppSwitcher will be immediately ready after head unit sleep.

Please add AppSwitcher (com.thf.AppSwitcher) to the while list, not AppSwitcherStarter.
[Android Head-Units] TorstenH:
Attached version 2.7.3 to first post.

Whats new:

https://xdaforums.com/t/appswitcher...-devices-incl-autostart.4435555/post-86783203
[Android Head-Units] roubi:
Installed 2.7.3 today, deleted the dummy entries in "On button press log entry" and "Long button press log entry" and installed automate to start wifi hotspot. Everything is working fine. 🙂👍

Thanks again for the great work! 🤘🙂
[Android Head-Units] TorstenH:
Thank you for the feedback and confirmation that the bug has been fixed.

I am happy about a positive feedback. But also about a negative, if it is constructive.

Always have a good trip with AppSwitcher.
[Android Head-Units] TorstenH:
Do you want AppSwitcher allows to opening Junsuns equalizer?
[Android Head-Units] TorstenH:
The intension of AppSwitcher is to minimize your screen interactions while driving.

AppSwitcher allows to keep your eyes on the street, instead of starting apps with several clicks on tiny icons.

Never configure AppSwitcher

while driving, please. ​
[Android Head-Units] AndreyOleynik:
Hello! I have not common SWC keys on my car and now use my own arduino usb stick as virtual keyboard to control android device. Have a question, can you add some receiver or option to setup switch button? Maybe I can call some activity to switch current app using your applicaiton? Maybe I can send some Broadcast message or call activity on my own keypress? Sorry for my English.
[Android Head-Units] ser_hero:
Hello. In 2.7.3 there is a problem with switching apps.

Usually, current app is absent from the menu. F.e when navi is on foreground and I press switch button, navi is absent in menu.

I have two media apps in settings, and one of them starts automatically after launch. And when I press switch button for the first time all apps are present in menu, including media app that is in foreground. And second press works as it should.

Problem appear in 2.7.3.
[Android Head-Units] TorstenH:
You could write a log entry to Android log and configure it in AppSwitcher settings section "Log listener".

But you should first have a look into the Android log. Maybe already messages gets created as soon as you click on a button of your virtual keyboard.

I suggest to use app logcat reader for a first investigation.
[Android Head-Units] TorstenH:
Could you please do the following test for me:

Let the media app launch and do nothing but wait five minutes. Then press the SWC button.

My expectation is that the media app in foreground is not appearing in the list.
[Android Head-Units] AndreyOleynik:
Yes, thanks, this should work! I can write any log message. I handle my keyboard with KeyMapper app. I thought to write some app switcher, but found your app and think it'm much better to use your one! It looks great) Are you going to make it opensource in future?

Up: KeyMapper hasn't logs... And hasn't log as action. Only send Intent, launch app, send broadcast and many actions with android... Need to create application, that receive broadcast and log it as I understood...

Up2: Can you explain what these events means:

private String logLongPress;

private String logOnPress;

private String logShortPress;

What difference OnPress and ShortPress? As I understood LongPress works as Home. What is doing short press event? Only stops dialog timer? Thanks!
[Android Head-Units] TorstenH:
But maybe KeyMapper logs by default that it received a key and you need not to define a action or just define a dummy action by sending a dummy intent.

Another approach would be to check if Automate logs received keys. The good thing would be that AppSwitcher can re-activate the Automate service and start a flow. Some head units are killing services and don't restart them after sleep/reboot.

OnPress: you push down the key

ShortPress: you release the key after a short period of time

LongPress: you release the key after a long period of time

OnPress is not needed but allows AppSwitcher to stop the launch countdown before it's clear how long the user will press the button. This is relevant if dialog delay is set to a short time period.
[Android Head-Units] ser_hero:
I check it. No, media app is still there.

Also I tried to reset settings (on android applist) and reinstall AppSwitcher — nothing changed.
[Android Head-Units] TorstenH:
Two weeks ago I already had a look on this topic. But I have no solution for this issue, now.

The issue doesn't occure on my dev environment and not on my smartphone. I think it's related to bad service startup performance.
[Android Head-Units] ser_hero:
Maybe the case appeared after installing new firmware (8667Q军灿UI02-国外-1280x720_v23_20221121.zip). It's excellent (they changed interface ppi), but maybe there're some changes on wake up sequence too.
[Android Head-Units] TorstenH:
This is possible because I performed the test on a MTK825X unit.

But you should know there is a newer firmware for 8667 from current year available.
[Android Head-Units] ser_hero:
v23 was the last one as of april.
[Android Head-Units] TorstenH:
There you can find a v28 😉

Post in thread '[Firmware] Junsun V1 8667Q - 8G/128G VHD QLED' https://xdaforums.com/t/firmware-junsun-v1-8667q-8g-128g-vhd-qled.4405475/post-88457415

But continue firmware discussion in the corresponding thread.
[Android Head-Units] ser_hero:
Same problem on v28, but I didn't check it with longer waiting after exit from sleep mode yet.
[Android Head-Units] TorstenH:
Attached version 2.7.4 to first post.

Whats new:

- new setting "Dialog\Equalizer" which allows to show a button to open the head units equalizer.

https://xdaforums.com/t/appswitcher...-devices-incl-autostart.4435555/post-88460541

This will allow easy access to sound settings without the need to walk through head unit settings or radio app.

- fixed flickering. It's not required anymore to enable "Others\Disable navi start activity" to avoid flickering of the dialog.

This especially improves usability on 8667 devices because disabling of the "navi start activity" is not possible without massive side effects.

Thanks again @Jetblack31 for your help with several tests and valuable feedback.

The option "Others\Disable navi start activity" is still available but may get removed in further versions.
[Android Head-Units] lordmuggins:
Has anyone else had an error with this, i.e. "No read logs permission", and then the "Self-Authorization" fails and advises you to "You can use adb to authorize AppSwitcher manually" ? I have a chinese head unit.. not sure of the actual model, but I'd love to be able to use this app switcher instead!
[Android Head-Units] TorstenH:
In this case you need to give AppSwitcher the required permission by yourself. Because Android doesn't offer a screen to grant the read logs permission you need to be able to execute adb commands. Usually adb commands can be executed if USB debugging is enabled.
[Android Head-Units] lordmuggins:
I'll take a look at my head unit later to see if there's an option to enable debugging. I already have ADB set up on my Mac for an android phone.. what is the command to enable this particular permission?
[Android Head-Units] TorstenH:
Can be found here in the code box:

https://xdaforums.com/t/appswitcher...-devices-incl-autostart.4435555/post-86825555
[Android Head-Units] lordmuggins:
Perfect, thanks! Will try it later.
[Android Head-Units] super_paws:
Trying to get this to work on a K706 with no luck.

@TorstenH how is the switcher triggered? I assumed this is by log entries but changing these entries to what I see in logcat don't seem to pop anything up. Do I also need to specifically set a SWC button to invoke startActivity with AppSwitcher?
[Android Head-Units] TorstenH:
AppSwitcher gets triggered by Android log entries. It doesn't matter if those entries are a result of pressing a SWC button or another app which writes to the Android log. You could even use it on your phone.

E.g. this is the setting to let AppSwitcher listen to "volume down" button on my phone:

Important is to start the service (the AppSwitcher icon needs to be visible on status bar and a notification message should be shown).

Please don't forget to adjust the Log tag in settings section "Log listener". And focus on the setting for "Short button press log entry".
[Android Head-Units] Jetblack31:
Thank you so much Torsten for this fantastic app I use everyday!

You deserve many cups of coffee and I hope that users are generous!

Kind regards,

Bernard
[Android Head-Units] rightangledevelopers:
I appreciate your unique perspective on this topic. Your writing style is engaging. Looking forward to reading more from you.
[Android Head-Units] TorstenH:
Attached AppSwitcher version 2.7.5 to first post

Fixed bugs:

- AppSwitcher detected itself as current foreground app and suggests all apps including the one which is behind the AppSwitcher dialog
[Android Head-Units] h2official:
Hello !

First of all, thank you very much for the work you've done to make it possible for many people like me to improve the use of our Android car radios!

I was looking for a way to customize and start applications after sleep mode, and I came across your applications! Thanks to you, I'm finally able to start my VPN and spotify at startup, and I'm planning to increase the possibilities with automate and tasker.

Here's a little feedback with an AWESAFE PX9s - MTK8667 8G Ram + 128Go rom - Alps FF_866x spm8667p1_64.

The firmware on my machine is: "8667Q军灿UI02-国外-VHD720x1280_v13_20220510", this seems to me to be the most stable with the best sound. But I haven't tested this year's if there are any. I put the links of several versions sent by the seller for information below.

- Junsun sleep configurator(1.5): Gives the impression of working but does nothing. I can change and write settings, they remain saved after reboot and sleep but the wireguard or spotify applications do not come back or are not restarted. I've tested white and yellow, but they don't change anything. Writing works, so root access must be good, but maybe the firmware works differently?

- AppSwitcher Smart SWC(2.7.4): Works in part for me, the spotify autostart functions work well and so does automate which allows me to start wireguard too, great!

The appswitcher function on the other hand can't work, my commands are connected via the canbus and, as I understand it, the commands are hard coded in the CAN box itself! In any case, I can't reassign them via the "SWC key" menu. My switch button gives the MODE function, which changes between fm, mp3 and the various inputs. There is a MODE>NAVI function in the 8888/Other hidden menu, but it doesn't work.

Do you think it would be possible to make a function to intercept and stop MODE and launch NAVI instead?

Other ideas, could you add the possibility of launching Tasker (https://xdaforums.com/t/solution-start-tasker-after-head-unit-sleep.4102439/post-83572233) directly in addition to Automate and perhaps the possibility of sending custom intents with an additional delay.

Good work! Thanks a lot!

Firmware for VHD720x1280 8667 / Awesafe - Junsun

8667Q军灿UI02-国外-VHD720x1280_v13_20220510(1).zip - 1.8 Go

,8667Q军灿UI02-国外-VHD720x1280_v22_20220716.zip - 1.7 Go

,8667Q军灿UI02-国外-VHD720x1280_v23_20220801.zip - 1.7 Go

Edit: added versions of apps, and correction in text
[Android Head-Units] TorstenH:
Thank you very much for your positive feedback. Let me try to answer your questions below...

We already identified that the configuration file which gets modified by JSC is available on 8667 units by default. Unfortunately the head unit seems not to consider this file.

I'm still looking for users with technical affinity to do more tests on their 8667 unit because I don't have such a device to do test by my own.

There are some cars which provides their SWC as resistance matrix which is connected to the CAN box. In this case it's possible to change the wiring, connect the resistance matrix directly to the head unit and use the learning function.

In factory menu (code 8878) a settings menu labeled with "menu icons" is available. The apps selected here are cycled by the mode key.

Deselecting the radio app makes it not usable anymore so my idea to just deselect all apps doesn't work.

I checked the implementation of the mode key which is realized in the central system app MainUI. Changing it requires to de- and recompile the whole system app. Unfortunately I wasn't able to create a clean decompiled version of this app. I still try to find a working solution but can't promise success...

Both is technical possible. But may I ask what you want to do with Tasker which can't be realized with Automate?

Automate can send custom intents (broadcast / start app) and has a delay block.

Thank you. I'm looking forward for your response.
[Android Head-Units] h2official:
I'm willing to give it a try if you need, but at the moment I don't have a solution for ROOT commands. I can't connect via ADB Wired, and via ADB Wifi, I can't identify myself as root with the usual command "su @#zxcvbnmasdfghjklqwertyuiop1234567890,.".

I didn't know it was possible, I'll take a look at the wiring.

Ah I had already "played" with this menu but I hadn't noticed that it changed the way the MODE key worked, I thought it was only to make shortcuts appear/disappear in the stock launcher, I'll give it a try too!

No problem! Thanks for your efforts!

I finally figured out how to change the assignment of the touch buttons on the side of the screen (8888/Touch Study), I reassigned the NAVI function to the Volume+ button (and deleted the original volume+ function): Unfortunately, no action seems to occur.

I saw in a post that you were talking about logcat reader, I'm going to try that too to see a bit more clearly.

Of course you can ask!

I've actually been using Tasker for several years, and I have a premium version without the play store, so I'd like to keep it. I don't know the major differences between the two. However, with Tasker and the Termux plugin, I can run and install an infinite number of linux packages/commands. I use this on my phones to do mainly "Home Automation".

I've seen the custom intents and delays on Automate, which is what I'm using at the moment. However, I've noticed that quite a few applications have functions that can be called in this way, and could avoid a "cascade" of application launches for someone who only has 1 intent to do.
[Android Head-Units] Urist76:
Hello, today I installed the program, I use it .. It's strange that the GPS button does not work the first time. Only from the second or even the third time. In principle, for 1 day of use, little can be said. We will continue to use, look. Thank you very much for the program. It's a pity there is no Russian language.
[Android Head-Units] tekhtime:
Does this override the default mode button behaviour on Xtrons?
[Android Head-Units] TorstenH:
I would need further information to provide an answer. E.g. you could make a picture of the "About Screen" so I can see your device information.

And additionally a photo of your "Log listener" settings.
[Android Head-Units] TorstenH:
No it doesn't overwrite a button. But especially if you have a dedicated button to start the navigation app or if you can assign a button to start the navigation app, it should work on Xtrons, too..

Another possibility is to bypass the CAN box for SWC (see next post). Unfortunately that's not possible for all cars.
[Android Head-Units] TorstenH:
I supported a XDA user installing his Junsun head unit and checked the pinout of the original head unit.

His SWC is connected via a CAN box and the keys are mapped fixed to its functions. You know that the SWC learning function can't be used if a CAN box is in place.

But in his case it's easy possible to bypass the CAN box for SWC - without loosing the other CAN related features by connecting the marked wires to KEY1 and GND of the head unit, instead of the CAN box.

The result is a working SWC study and the easy use of AppSwitcher via a key of his choice.
[Android Head-Units] h2official:
I managed to run the application on an AWESAFE PX9s (== Junsun V1 "pro" / MT 8667 8G Ram + 128Go rom - Alps FF_866x spm8667p1_64) in a 2009 Peugeot 308 MkI. The buttons are not reassignable with the "SWC" application, as they are connected via a G-PSA-RZ-51 CAN box (set to CAN Type = 127).

The buttons are not configurable, and the button I'm interested in switches the HU's modes (FM/Bluetooth etc..).

Edit: *Warning: this makes the built-in FM radio unusable! If you value radio, this won't work for you. Or you'll have to install an IP radio application.

First, I installed AppSwitcher according to the normal installation procedure.

Secondly, following TorstenH's advice, I tried to disable all the options in the system menu: 8888/"Menu Icon"*: to do this, you have to press twice on all the functions that appear on the right so that they move to the list on the left. Once done, press "SAVE".

After rebooting, the MODE button will no longer do anything.

Following TorstenH's advice, I installed and activated logcatreader with the nDealPkey filter by clicking on the magnifying glass. By clicking several times on the button I was looking for, I found that in my case the button of interest gave the value nDealPkey = = 10.

So I entered this value in the "short button press log entry" parameter of AppSwitcher's Log Listener menu, and voilà!

Now all you have to do is configure your favorite settings and applications! For the record, on this unit, the "Automate" autostart also works correctly.

There are, however, few bugs I've encountered:

- Sometimes, when switching to the launcher ("Lauwnchair" in my case), you have to press several times for the window to appear, but the "beep" is heard, and the keystroke is recorded in the logs. Other times, it works right on first attempt. In all other applications, it's fine.

- I installed the latest version and activated the "smart apps" in foreground, but it doesn't seem to work. The only apps that appear are the ones I configure (in my case: Spotify, Maps and the launcher). However, I didn't try to disable everything and leave just "smart apps". Edit: Not a bug, I had misunderstood how it worked.

- The equalizer (or the shortcut to it) doesn't appear in the window after activation and reboot. Edit: Not a bug, I had misunderstood how it worked.

- Sometimes, after saving and rebooting in a system menu (8888/8878), the default navigation engine is reset to "Maps", which then requires reapplication of "AppSwitcherStarter" in the navigation settings after reboot. This may be a default setting made by the mainapp when the parameters were saved. Edit: Not related to AppSwitcher

In any case, thanks again for the application!

For more information, here are the button "nDealPkey" values I've been able to identify for myself:

Mode = 10; Vol + = 19; Vol - = 20; next track = 44; prev track = 45

the button on the windshield washer control (a.k.a onboard display "show", the one that displays consumption information) : "cycle show" = 8
[Android Head-Units] TorstenH:
I will provide a detailed answer regarding your identified bugs later because in some cases it seems to be just a confusion how the options work...