BimmerGestalt / AAIdrive

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

App stuck on connecting to car after phone reboot #812

Closed Vasmares closed 2 months ago

Vasmares commented 3 months ago

Hi,

I had this several times now. The battery of my phone died during the day. The car wasnt connected at that point.

But after charging my phone and eventually connecting it to the car, the app does not connect anymore. See screenshot. The App tells me it cant find the Mini App anymore, but Mini App itself is still installed, connected and working just fine.

The only solution i found (apart from reinstalling) is to go into the android settings for this app and wipe cache and data. Then tap through the initial app screen again.

This does not happen, when I reboot my phone (Samsung S22 Ultra Android 13) regulary. Only when the battery dies. Maybe the phone "shuts down" differently when the battery is flat ?

App Version 1.4.2-39-4b386f3 04.05.2024 04:38:23

Screenshot_20240812_230215_AAIdrive

MMP-sys commented 3 months ago

Same problem for me. I have a S20 and when it restarts the app does not connect to car. Reinstall app makes it work again.

hufman commented 3 months ago

I believe that red color means that it can't locate the security service within MyBMW, there should be some text explaining why it can't connect.

Vasmares commented 3 months ago

There wasnt. It just said the mybmw / mini app couldnt be found

hufman commented 3 months ago

That is the text that indicates the problem it encountered. Unfortunately I don't know why it wouldn't be able to find the MyBMW/Mini app after restarting from a dead battery. My phone often experiences sudden reboots, which should be similar to your phone's sudden power-off, and I haven't experienced an issue when opening the app after reboots. Reinstalling the app shouldn't matter, AAIdrive doesn't cache what BMW apps it sees. Does Force Closing the app resolve the issue too?

Guenther-i3s commented 2 months ago

Last working day was 15.8.2024 (data in the carinfo) After that the app 4.2-83 wanted not to work. Deinstall and reinstall the app but nothing changed.

App always say "due to closing the app, now it has a problem with background working rights". I changed the rights from "optimized" to "not restricted" but nothing changed.

I installed the Version 4.2-39 and the app worked! And after updating the app over Google Playstore now also 4.2-83 is working!

It seems, that something went wrong during the first app update and the error could not fixed through a reinstall. The installing of the older version cleared the error.

hufman commented 2 months ago

The "background permissions" error will clear the next time it connects to the car, and it has no influence on the connection process. I'm glad it works again, but unfortunately there's nothing for me to help with. AAIdrive tries to connect to MyBMW the same way in every attempt, and I'm not sure why your phone rebooting suddenly would cause this to fail. My own phone's abrupt resets do not trigger it.