BimmerGestalt / AAIdrive

Implementations of some Android Auto features as unofficial IDrive apps
MIT License
547 stars 90 forks source link

AAIdrive closes on ID6 #706

Closed Nickems closed 1 year ago

Nickems commented 1 year ago

Hello, I use the app with ID6/S23 Ultra to listen to Youtube Music. After 5-10 minutes, the AAIdrive app closes (not sure if crash or closed by something, there is no error). AAidrive, My BMW App and Youtube Music are added to never sleeping apps and exluded from memory clean-up. The crash happens in one of two ways:

  1. When the YTM app is running on the car and I try to open it, nothing happens, just a wheel spins infront of it. After a while, the music would stop and when I check the phone, YTM is paused, My BMW is connected, but AAIdrive is not running.
  2. Sometimes the AAIdrive would outright crash, music stop, but everything else stays connected. When I start the App again on the phone, it would reconnect and the music would continue playing.

I really like the app and all the features, it's amazing work, but it crashes every time I use it while I drive :/

hufman commented 1 year ago

There's a few different symptoms you're talking about. When you say "AAIdrive app closes", what precisely do you mean? Do you have the phone screen open and watching the AAIdrive phone UI disappear?

When the YTM app icon in the car is stuck spinning, that means AAIdrive is not communicating with the car (didn't receive the command or didn't send the command to reset the icon from spinning state). This points to MyBMW not tunneling the packets properly. MyBMW may show the notification saying it is connected, but there are two subtly different notifications based on whether just Bluetooth is connected or if the Apps tunnel is also running. Check the car's Apps checkbox for a quick way to tell.

"AAIdrive outright crashing", does this just mean all the UI disappears from the car? This can indeed be caused by AAIdrive crashing, or it could be that MyBMW didn't keep the heartbeat going and the car disconnected the tunnel.

When a disconnection happens, check the Apps checkbox in the car's Mobile Devices menu. If this has cleared itself, that means the tunnel from MyBMW to the car has broken, and you should look for any other ways that Samsung is killing MyBMW in the background. S23 and OneUI 5.1 are especially problematic, from the reports I've been hearing.

Nickems commented 1 year ago

Hi Walter,

First of all, thanks a lot for your help and suggestions.

I spent soome time tracing what exactly happens on the phone and the car. So: When the phone is unlocked and AAID UI open and showing connected, the magic happens and everything runs.

If I lock the phone, in some time (6-10mins) the car's media will stop receiving notifications, the wheel on YTM will spin, but I won't be able to open the app or scroll through the playlist on my HUD. At this point phone is connected and the Apps chebox is checked. Then in another minute or so, the connection will fail completely. At this point, the Apps checkbox gets unchecked for a second, then checked again. If I unlock the phone and open the AAID UI, it would reconnect and I can use it again.

Funny thing is, if the connection ran for a while with phone unlocked and UI open, when I lock the phone it still runs, but when I unlock it, connection is closed and Apps checkbox unchecked, then checked again right after it.

If the connection drops outright when using the app on locked phone, thr Apps checkbox gets unchecked for a second, then checked again. Unlocking the phone and opening the UI usually fixes the connection and all features start working on the car again.

hufman commented 1 year ago

Yes that sounds like background processing restrictions. Please check all the different battery configuration places in Samsung's settings. I'm reading that OneUI6 will be better behaved, whenever that comes out.

Nickems commented 1 year ago

Thanks for all the help Walter! I had the My BMW and AAID apps in never sleeping apps and excluded from memory checks, but I had no idea there are battery settings per app as well... So when I set both apps to unrestricted, everything works perfectly.

I just wanted to say again how impressive this app really is. Thanks again for saving us poor BMW suckers from their worthless multimedia systems.

hufman commented 1 year ago

Glad we figured it out!