yashsingh1/xdaforums huggingface dataset:
[Paid Software Announcement and Discussion] Emil Borconi:
It is possible that your car will need a rooted device and it can be one of those where I can't hack my way into the car. What car is it?
[Paid Software Announcement and Discussion] epsonix:
[MENTION=842765]Emil Borconi[/MENTION]

I emailed you bug report. Car is Alfa Romeo Giulia 2018 with 2nd last firmware version (MV085.002.046).

I think I will buy MK809iV or V, emailed you a few locally available offers, maybe you can suggest one of them as best choice.
[Paid Software Announcement and Discussion] Emil Borconi:
One thing.

Wifi Launcher for HUR needs to have location permission enabled. If you're master is on 10, make sure you set the permission to ALWAYS, not only when the app is in use, otherwise the app won't be able to identify the Wifi names and connect to it properly.

I think this is stupid from Google, as it confuses people, why an app which has nothing to do with you're location and actually never receives your location should force the user to grant this permission to be able to get the WiFi network name....
[Paid Software Announcement and Discussion] epsonix:
The location on both my phones is enabled all the time (on drop down menu, that is one you mean?). I have Android 9 master and Android 8 slave.

I played a bit with case 3 now. So, first thing is that my WiFi gets disabled when I plug to USB the slave I get for the moment message from AAGW that it is Running... but then WiFi disables and notification from AAGW disables. When I turn on manually WiFI, nothing happens. In case 3 mode I have permanently toast message about it can't search all WiFi netwoerks and to check SIM card (none in slave) or mobile networks.

I send you another bug report I just generated, look around 15:30+ did 2 attempts pn freshly booted phones, power optimization on both turned off for respective apks and location services on both were on from drop down menu.
[Paid Software Announcement and Discussion] Emil Borconi:
No that setting is for those with master running Android 10.

I will look at the bug report a bit later.
[Paid Software Announcement and Discussion] JohnnyCanuck:
I cannot get Case 1 or 2 to work, but reading the above I did have location on my master set to "only when using app" so that might be the trick. I will try later.

I can get Case 3 to work. I've played around with plenty of ROMs on my slave and I am having the opposite experience from what Emil posed in his recommendation. Much more stable experience on Oreo or later ROMs than on Nougat. I can reliably get Case 3 with Lineage 15.1, much more hit and miss with stock or Lineage 14.1 (both 7.1).

My big issue is actually audio dropouts. It is not a pleasant listening experience when I can get it to work. If I can get WiFi Launcher working, will that provide a better audio connection? I do have a shorter high quality Anker cable on order from Amazon in the event that cabling is the issue, but any ideas on how to reduce dropouts would be really helpful.
[Paid Software Announcement and Discussion] fma965:
[MENTION=842765]Emil Borconi[/MENTION]

So upon further testing my master phone (one plus 7t pro) doesn't automatically save the HUR network, before in the past it showed as "added by HUR Wifi Launcher" in the Wifi Settings but now it doesn't seem to automatically add them, if i add it manually it connects but AA etc still doesn't work just does the exact same thing as before.
[Paid Software Announcement and Discussion] Emil Borconi:
Not necessarily, audio drop outs are probably caused by slow wifi...
[Paid Software Announcement and Discussion] Emil Borconi:
Check the location permission to set it to always, otherwise the app won't be able to identify Wifi networks.
[Paid Software Announcement and Discussion] sibesaver:
I still don't know what is being killed but I suspect the Wifi Launcher for HUR. I suspect this because I substituted the tasker task provided, added ip oaddress and case 1 is now working flawlessly on two different 15-minute drives. Used Spotify, Waze, and SMS with the google assistant.

Setup:

Master Pixel 2XL non-root lastest Android 10

Slave Pixel non-root android 10 (last updated Dec 19)

Headunit Kenwood DDX9704s

Hopefully, this helps others and [MENTION=842765]Emil Borconi[/MENTION] with this awesome development.
[Paid Software Announcement and Discussion] martin.armstrong:
Finally success!

After several hours of fumbling around on the master phone trying to find the possible cause, based on what you had suggested, I did the following:

1. I switched off optimisation for the wifi launcher.

2. I initially could not find an autorun manager on my phone , only a section in Settings called 'auto-select based on app usage' which , when selected shows a list of apps in a 'speed up' section and I moved wifi launcher to this section. It is called optiflex which 'accelerates app launches, reduces app reloads and saves power on standby'.

Both these measures did not cure the problem.

3. Then I looked in internet for asus apps that were a replacement for the autorun app and I found out about an auto-start Manager, which, would you believe, is hidden away at the end of the quick settings, displayed by swiping twice from top and then tapping on edit and I found it right at the bottom and moved it up into the top 9 quick settings for easy access. In this you can specify which apps should be allowed to start automatically, and I selected wifi launcher.

Only after I had done all 3 steps and I had restarted the master for good measure and also restarted the slave because it did not seem to be turning the hotspot on and off properly, did it finally work. Not absolutely every time but all times bar one, toggling the bluetooth on the master caused AA to appear on car screen.

When I had done only steps 1 and 2 the wifi launcher still worked as previously, sometimes it initially launches AA but after slave is unplugged and plugged in, AA never appears again, even after repeated toggling of bluetooth in the master while master remains connected constantly to slave hotspot.

I also experienced the same behaviour a couple of times that happened with an older version of Wifi Launcher/AAGateway, and I presume Marshy33 had also experienced the same thing because you sent newer test versions to only the two of us at the same time ie. the usb connection was being switched off and on regularly about every 9-14 secs and hardly giving the master enough time to connect to the slave hotspot and even if it had done so, the usb would still be switched off and on again again. As soon as I selected a BT connection in wifi launcher to a device that was not available, it stopped happening and then when I re-selected the car BT this usb switching off and on also did not to happen any more. Nevertheless no AA picture appeared again on the car screen, despite repeated toggling of the master bluetooth.
[Paid Software Announcement and Discussion] JohnnyCanuck:
Any suggestions? I've tried multiple ROMs (currently Lineage 14.1 with a custom kernel that supports 5GHz connections). My Master is a Note 10 so there should be no issue on that end.
[Paid Software Announcement and Discussion] fma965:
Well when i checked it was showing it correctly again. Still couldn't get it working.

Flashed Project Spaghet to my J5 and then installed a Treble ROM Pixel Experience 9.0 and rooted and it still wouldn't work, disabled USB debugging and it works :eek: The quality seems bad though is it supposed to be? it's like it's bit rate is mega low?
[Paid Software Announcement and Discussion] Emil Borconi:
Definitely a step forward. Glad you got to the bottom of it. Now can I request a bug report from the slave when the usb is being switched on and off?

I think it might be something with the socket not being closed correctly on the slave, which prevents a reopening of it, which prevents AAGAteWay to function as normal.

This would be one advantage of the TV Stick that it always has a clear shutdown/startup every time you stop/start the car, so chances are that will connect 99% of the time.

When I sent you 2 the test version I did see this, that there was a listening port stuck on IPV6, which could not be closed which prevented a new start, but I thought I've managed to fix that, maybe I was wrong...
[Paid Software Announcement and Discussion] Marshy33:
I'm also having audio issue. I've spent the whole of today trying to figure them out. It seems a common issue with android auto, the google forums are flooded with people looking for a fix.

I've tried different ROMs on both slave and master, 5ghz and 2.4ghz hotspots. Different slave phones running different versions of android. Removing Bluetooth altogether from the slave. Changing multiple settings on Bluetooth on the master and in spotify. Also factory reset my head unit. All number of things suggested online, but still no luck.

Next up is a new cable and/or updating my master to android 10 and my phones new firmware. And also trying a different master.

I'm starting to think its either my head unit or my master.

If I plug in by cable there is no issue.

I will carry on trying though, as think this app is awesome.
[Paid Software Announcement and Discussion] Klinge85:
I Email to you. :)
[Paid Software Announcement and Discussion] Emil Borconi:
5ghz should be smooth as butter no shutter...

Wonder what can cause it, especially that when you run the app in root mode there is no data alteration at all it just passed trough data and since it's multi-thread performance should be same as USB....

I will check tomorrow if I actually set the TCP to work in nodelay mode that might give a slight difference but it's strange...
[Paid Software Announcement and Discussion] Marshy33:
Thanks. I appreciate the time you spend on this!

The first song normally plays fine. Its normally after fast forwarding a few tracks, Spotify will show as playing on the head unit, but no sound. Sometimes when you go forward a track and then back the song will play for a few seconds then cut out, or sometimes a song from 2 tracks ago that I skipped past will start playing, even though both my head unit and AA show a different song from what's playing. It's very strange.
[Paid Software Announcement and Discussion] DAVIZINHO:
Hello again.

I have tasker and autoimput bought.

I import your task and try to play. but only open Android Auto developers setings. but nothing more :( not enable de server :(

i need to setup something more?

thanks a lot!!
[Paid Software Announcement and Discussion] smoki3:
I noticed that Google assistant is not working. Looks like the microphone is not working.

And one other thing, I get a huge time difference between the screen and Spotify audio. The audio was around 30s to late
[Paid Software Announcement and Discussion] Emil Borconi:
Was that with root or non-root mode?
[Paid Software Announcement and Discussion] martin.armstrong:
It is definitely progress because toggling the bluetooth on the master now reliably causes the AA picture to appear on the car screen, but as you are trying to automate everything, to my mind the toggling of the master bluetooth when there is a wifi connection between the master and the slave hotspot but there is no AA connection (no AA picture on car screen), could be done by wifi launcher surely. I should not have to do it manually because it means I have to take the master out of my pocket in the car and check whether there is a connection to the slave hotspot and then manually toggle the bluetooth.
[Paid Software Announcement and Discussion] Emil Borconi:
Normally the launcher should only ever fire up when you connect to the BT (aka you get in the car) and then it should connect to tha slaves hotspot, once both conditions are met it should bring up AA.

Are you saying that if the master connect to the car's BT before the slave creates the hotspot it's not able to connect and you need to toggle the BT on the mast?
[Paid Software Announcement and Discussion] JohnnyCanuck:
So, Emil's response that he thinks dropouts are related to the wifi speed between the devices got me looking into that. One that pops up is increase TCP buffer size (only works on a rooted phone which would be my slave) which I might try (but might not have time for a day or two). You might want to try and see if it helps.
[Paid Software Announcement and Discussion] martin.armstrong:
Yes. when I turn on the ignition of the car (equivalent to starting the car engine in my case of my car) the master BT connects quite quickly to the car and the slave hotspot starts up fairly quickly but it takes some time quite often for the master to connect to the slave wifi hotspot (several secs), even when normally before the testing I get the master to forget the home wifi so the slave hotspot is the only wifi connection that it has the password of. Obviously if I do not do that it would take even longer. Quite often the AA screen then does not appear on the car and I have to manually toggle the master bluetooth to cause it to appear and this now pretty reliably happens after my latest tweaks. If that could be automated it would be good because it is the only manual thing remaining, apart from starting the AA headunit server initially which I see from recent posts could be done in tasker, possibly when the car bluetooth is detected, and maybe stopping it again when the car's bluetooth is out of range.
[Paid Software Announcement and Discussion] smoki3:
It was in root mode
[Paid Software Announcement and Discussion] martin.armstrong:
You have to enable the accessibility service in Autoinput, by running the Autoinput app and clicking on the message in red which says accessibility service not enabled, then on the subsequent screen tap on

Autoinput and tap on enable on the next screen.

Restart tasker for good measure.
[Paid Software Announcement and Discussion] fma965:
Quality seems better today thing it was just a random quirk, running 5ghz and it's extremely smooth :) i do wonder though, 2.4ghz should have more than enough bandwidth for this stream how come 5ghz is needed for this, doesn't matter just curious
[Paid Software Announcement and Discussion] borisk0:
I have exactly the same issue. I use Pixel 4 XL non-root as master and Nexus 5 root as slave. Apparently I should follow case 3, so I use it. My HU is Skoda Bolero MIB2. I haven't collected logs yet.
[Paid Software Announcement and Discussion] DAVIZINHO:
Hello,

thanks for your reply!!

in autoinput i enabled the accessibility service and apears a green message. :(

And not works. maybe i need something more?

thanks
[Paid Software Announcement and Discussion] martin.armstrong:
open the task in tasker and press on the play button to run the task and see if error messages are displayed.

Also you may have to do some of the things mentioned in this web page:

https://tasker.joaoapps.com/userguide/en/faqs/faq-problem.html#00
[Paid Software Announcement and Discussion] pflarini:
Emil, what´s the difference from starting tethering in slave from your application or starting manually ?

I said that because is much simpler to keep tethering always on in slave. I can do this stating it manually :)
[Paid Software Announcement and Discussion] Emil Borconi:
No actually for you're case you should stick with case 1 not 3 preferably.

You can always install Android Auto for phone screen, then you can access the developer settings and turn on the headunit server and run case 3 as well if you really want.
[Paid Software Announcement and Discussion] Emil Borconi:
Shouldn't really be one....
[Paid Software Announcement and Discussion] borisk0:
That's what I did, actually.
[Paid Software Announcement and Discussion] DAVIZINHO:
i will do again. and try. thanks

when o launch the action in tasker. The autoinput give me this error "action time out"
[Paid Software Announcement and Discussion] martin.armstrong:
try increasing wait time in task, eg. the first one from 2->4 secs
[Paid Software Announcement and Discussion] JohnnyCanuck:
It works for me. Is your AA in Developer Mode? You should see it open settings, then open the three dot menu and then press Start Head Unit Server. Double check to make sure AutoInput is activated? You may need to re-record the AutoInput sequence as it can be disrupted quite easily. Mine was done on a Pixel 3 but also works fine on a Note 10. If you have a different phone, it may be an issue.

Martin's given some good tips as well. Increasing the delay might be the one that works out for you. Here's a screen recording of it executing:

https://i.imgur.com/bGBKk8t.mp4
[Paid Software Announcement and Discussion] DAVIZINHO:
i think Its a problem whit autoinput but i dont know why.

Android auto have developer mode and Works.

the tasker log in the first task of autoinput is this

17.12.50/ActionArgBundle key: NearbyText: replace <null> String value with null
17.12.50/ActionArgBundle key: RepeatTimes: replace <null> String value with null
17.12.50/ActionArgBundle key: TextToWrite: replace <null> String value with null
17.12.50/ActionArgBundle key: StoredAction: replace <null> String value with null
17.12.50/ActionArgBundle key: EnableDisableAccessibilityService: replace <null> String value with null
17.12.50/ActionArgBundle key: Password: replace <null> String value with null
17.12.50/ActionArgBundle key: RepeatInterval: replace <null> String value with null
17.12.50/E FIRE PLUGIN: AutoInput Action / com.twofortyfouram.locale.intent.action.FIRE_SETTING: 16 bundle keys
17.12.50/E AutoInput Action: plugin comp: com.joaomgcd.autoinput/com.joaomgcd.autoinput.broadcastreceiver.IntentServiceFire
17.12.50/E add wait type Plugin1 time 23
17.12.50/E add wait type Plugin1 done
17.12.50/E handlePluginFinish: taskExeID: 1 result 3
17.12.50/E pending result code
17.12.50/E add wait task
17.13.13/E Error: null
[Paid Software Announcement and Discussion] IlD4nX:
I made It! Now working perfectly on my Alfa Romeo Giulia with op5 root as slave and op7 pro as master.

I had to use hotspot from master and slave connecting to it and is fast like never before. Love it!

Now I just need to understand if there a way to start hotspot in master as Bluetooth connects... But for now I'm more than happy!
[Paid Software Announcement and Discussion] Matt_black_90:
I made my master turn on the hotspot when it connects to the cars Bluetooth through Macrodroid :)
[Paid Software Announcement and Discussion] pflarini:
If your master is android 8 you can do this, but if it is android 9, no way...
[Paid Software Announcement and Discussion] IlD4nX:
Uhmmm android 10 for Master,Android 9 for slave ...
[Paid Software Announcement and Discussion] martin.armstrong:
[MENTION=842765]Emil Borconi[/MENTION]

Your app certainly works a lot better with my latest tweaks on the master phone and mostly starts AA when I first come to use it on entering the car.

An automatic toggling of the master bluetooth by wifi launcher, however, when/if you can detect that there is a wifi connection with the slave hotspot but AA is not running, would be useful after the slave is unplugged from the car for any reason and then plugged in again when AA has already been running, because at least with my car/phone combination the AA connection does not come up again even after the master has re-established a wifi connection with slave hotspot.

By the way although in your instructions you seem to have written or implied that the AA head unit server should be started in the case of all configurations, I have found that with my configuration (case 1) I don't seem to need to do it.
[Paid Software Announcement and Discussion] DAVIZINHO:
wow. this is exactly all i Want!. :)

i keep trying
[Paid Software Announcement and Discussion] Matt_black_90:
It works for me on android 9.

Or are you referring to a specific problem on OnePlus devices on android 9?
[Paid Software Announcement and Discussion] sibesaver:
Could the force stop of itself AFTER AA is running on the head unit cause the connection to die on some devices? That was my problem, AA would die after 10 to 15 seconds. I would have to replug the USB to start another connection. When I switched to the tasker task and uninstalled HUR it seems to stay connected.
[Paid Software Announcement and Discussion] Emil Borconi:
Normally not, but.... send me an email and I will try to work this out with you next week (I'm going to have a busy weekend probably won't have too much time for this during the weekend).
[Paid Software Announcement and Discussion] sibesaver:
Thanks! What additional info can I provide in the email.?
[Paid Software Announcement and Discussion] Emil Borconi:
On a separate note I was playing around today with an Orange Pi and an Orange Pi Zero (waiting for my other devices to arrive). Things do look promising, the system being very very relaxed on all security measures and coming pre-rooted makes it easy to work with it. The problem is that the Orange Pi Zero (which has Wifi onboard) same like the banana Pi uses an Allwinner H2+ CPU which tends to heat up too much causing performance issues.... The bigger brothers I'm waiting for are using Allwinner H3 CPU which should not suffer from this heat problem.
[Paid Software Announcement and Discussion] Emil Borconi:
I will need bug report for sure and I will probably send you some test versions of the Launcher app (where I add more debug info) to try to figure it out.

I only asked for the email so I remember to do this, otherwise I might very well forget.
[Paid Software Announcement and Discussion] sibesaver:
Got it. Thanks again!
[Paid Software Announcement and Discussion] DAVIZINHO:
Done, i can create the tasker task that connect the hotspot and android auto (with autoinput).

Thanks for the support!
[Paid Software Announcement and Discussion] martin.armstrong:
A possible solution for a car/phone setup where the loss of AA connection after 30 minutes does not happen (I have not used your new version for a long journey yet, so I don't know whether I would also experience that), is to provide a toggle in the wifi launcher which allows a user to specify that the wifi launcher is not force stopped after the first AA connection has been established, thus leaving it running and able to detect a subsequent loss of AA connection, I presume then the wifi launcher will automatically re-initiate the AAconnection? This solution also removes the need to get to know an app like tasker or automate if one has not already used them.

The problem with the use of tasker or automate that you mentioned in the last section of your reply is:

1. it would be ok with tasker but the mobile data has to be switched off for the wifi connection trigger to work properly, so it would have to be then switched on again after AA had re-started (I previously had the problem that it was not reliable ie. it usually worked a couple times but then no further, but not optimising tasker and also enabling automatic launch for it in the Asus auto-start manager, as I did with wifi launcher, cured the problem)

2. with automate you can have a trigger on a wifi connection but you cannot specify which one, so it would trigger on any wifi connection, including one to the home wifi, therefore it would only work properly to restore the AA connection when you were out of range of the home wifi. This could perhaps be acceptable as long as one realises that it is no good unplugging and plugging in the slave when one is in range of the home wifi and expecting the AA connection to be restored immediately by the automate flow as it would only be restored once one drove off and got out of range of the home wifi. I think but am not sure that also the mobile network needs to be off as with tasker for the triggering to work properly.

In both these cases it is probably easier to simply re-launch the wifi-launcher manually. I will probably try it later today to see if the AA connection is then restored after unplugging and plugging in the master.