BimmerGestalt / AAIdrive

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

App no longer connceting to car #197

Closed ronniebadmf closed 3 years ago

ronniebadmf commented 3 years ago

Screenshot_20210131-200232

App stopped connecting to BMW idrive 6. Several restarts and reconnections did not solve the problem. Under car phone settings the app selection switches on and off regularly, which shows that it is trying to connect and for whatever reason it fails.

hufman commented 3 years ago

Good evening, and thanks for the question!

The Apps checkmark in your car is a direct representation of the status of the Apps connection from the car. When BMW Connected establishes the tunnel to the car (even before running any apps over it) this checkmark lights up. Similarly, if this tunnel is shut down for some reason, this checkmark will uncheck.

As such, it is directly controlled by the BMW Connected app. It runs a watchdog process that pings the car every few seconds or so, and will close the connection if this watchdog thinks the connection is stuck. So, we have to figure out why the BMW Connected app is closing the connection in your case.

In your connection debugging, have you tried force-killing the BMW Connected app entirely, not just restarting the connection? I've also experienced a few false starts like you describe when my phone hasn't restarted in a few weeks, I suspect memory pressure causing troubles. I also removed the other brand from my phone, because I've seen occasional evidence of both BMW and Mini Connected trying to run the tunnel and conflicting, but your screenshot shows that you already don't have Mini Connected installed.

I hope this helps! Since you haven't changed app versions, and BMW Connected hasn't upgraded much recently, it should be a temporary issue that can be figured out.

Sven31415 commented 3 years ago

Hello! I've actually got the same issue. Also iDrive 6. When the check box is turning on and of over and over again I can fix it by opening the AndroidAuto IDrive App. After that the connection is stable and everything runs fine. So I think the problem is that the AndroidAuto IDrive App has some issues with running in background? In December I had the same issue, that connection didn't seem to work at all, so I updated to a newer version, but a describe I've still got a similar issue

donsaimon commented 3 years ago

Same problem here. Connection is very unstable in the last month...

Sven31415 commented 3 years ago

Yes but it must have to do something with background processes, because when I open the App everything works fine immediately

donsaimon commented 3 years ago

You mean that if you open tha app AndroidAutoIdrive everything is OK? If yes, I will do a routine to open AndroidAutoIdrive automatically as soon as my phone connects to the car

Sven31415 commented 3 years ago

Exactly! I think this "bug" could also be fixed internally, but until it is I consider this as a great workaround.

donsaimon commented 3 years ago

Ok I will try. I have not used AndroidAutoIdrive since December as it connected only once every 4 or 5 times... If this workaround will work, I can use this fantastic app again!

hufman commented 3 years ago

I sincerely apologize for any instability! I really try to keep the latest build stable during development, but some things might slip through. I know I fixed some bugs on Jan 14th regarding initial module startup (which might have been causing random problems for a few months) and on Jan 23rd about continuing to start up after discovering the car's language (which definitely did break automatic connections until opening the phone app).

I do see that a new BMW Connected 6.4.1 came out in November in the USA, and a new 6.5.0 version came out in January for Europe, I hope that's just coincidental! If you are able to peek in adb logcat to find any suspicious messages from the BMW Connected or AndroidAutoIdrive apps, those would be useful clues! I think the behavior of the Apps checkmark appearing and disappearing indicates a problem with the BMW Connected tunnel, so it might be a valuable test to downgrade the Connected app version and see if it helps (I'm running a modified version of Mini Connected 6.3.0 with extra debug logging).

The initial screenshot shows the old Phone UI, please try upgrading to the latest build to see if it helps. The new UI, merged Dec 27, brings the connection details forward to the main screen, including any hints needed to unblock the next stage of the connection.

Sven31415 commented 3 years ago

No need to apologize at all, you're doing such a good job! I'm always using the latest version (max 1 week delay) and it got better again, but not as it was once. Maybe every 10th connection has those difficulties.

donsaimon commented 3 years ago

Thanks a lot for your job hufman! How can I upgrade to last version your app? I am currently using 1.2.2 that I thought was the last one...

hufman commented 3 years ago

Indeed, 1.2.2 is the most recent release. Additionally, every successful build is also posted soon after the code is pushed, with links to the sentry and nonalytics builds hidden in the main Readme page.

hufman commented 3 years ago

Good afternoon! I pushed up a few fixes for connection instability over the last few months, and I'm checking to see if you are still experiencing this problem in the most recent versions of the app?

donsaimon commented 3 years ago

Dear Walter, yes unfortunately I have yet connection problems even with the last updates. I tried last week after some months, but connection problems are still there for me unfortunately... Moreover I have no more the line "Audio player"... It is now "Sotify"... Very strange behaviour...

Thanks a lot

Best Regards,

Simone

Da: @. Inviato: 19 Maggio 2021 22:36 A: @. Rispondi a: @. Cc: @.; @.*** Oggetto: Re: [hufman/AndroidAutoIdrive] App no longer connceting to car (#197)

Good afternoon! I pushed up a few fixes for connection instability over the last few months, and I'm checking to see if you are still experiencing this problem in the most recent versions of the app?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/hufman/AndroidAutoIdrive/issues/197#issuecomment-844452851, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASMCOD4B2HV2QRL37I445HDTOQOLNANCNFSM4W3T7RHA.

hufman commented 3 years ago

I pushed up a new build that tries triggering Connected to continue connecting, maybe it'll help? It's hard to tell whether it helped in my tests or if I was just in a lucky period and it would've worked anyways! I think this change should help connect in the scenario when the Car Is Connected popup is showing but the Apps connection doesn't start.

@donsaimon This Spotify icon is the new interface that allows for global coverart, the Audioplayer is built only for ID4 and didn't provide the new coverart feature or the more native interface.

donsaimon commented 3 years ago

Thanks a lot for your effort Walter. I tried last version today, but I find more reliable (about connection) the previous version. About the voice "Audio player" that I had on the display menu, now substituted by the voice "Spotify"... My car has Id5 version... nevertheless I had "Audio player" voice... One question: what does the advanced setting "show always as Spotify in Idrive5+" do? I see no difference if I enable or disable that voice... Thanks a lot again Ciao Simone Da: @. Inviato: 29 Maggio 2021 02:25 A: @. Rispondi a: @. Cc: @.; @.*** Oggetto: Re: [hufman/AndroidAutoIdrive] App no longer connceting to car (#197)

I pushed up a new build that tries triggering Connected to continue connecting, maybe it'll help? It's hard to tell whether it helped in my tests or if I was just in a lucky period and it would've worked anyways! I think this change should help connect in the scenario when the Car Is Connected popup is showing but the Apps connection doesn't start.

@donsaimonhttps://github.com/donsaimon This Spotify icon is the new interface that allows for global coverart, the Audioplayer is built only for ID4 and didn't provide the new coverart feature or the more native interface.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/hufman/AndroidAutoIdrive/issues/197#issuecomment-850734861, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASMCOD3VJRDMFGOPDVOXK4LTQAX77ANCNFSM4W3T7RHA.

hufman commented 3 years ago

The app will run as Audioplayer by default. The most recent release only supports Audioplayer mode. After upgrading to a recent build, it will automatically run in Spotify mode if a new enough Spotify is detected. That Force Spotify Mode checkbox allows it to run as Spotify even without new Spotify installed. If you have old Spotify installed, then both the official Spotify app and this app's Spotify icon will show up. If you don't have any Spotify installed, then the car will still have a Spotify icon installed from this app. So, to reduce confusion, it will only run as Spotify in the right condition by default.

donsaimon commented 3 years ago

Thanks for your answer Walter. I tried to install an old version of Spotify. I have now 2 Spotify icons. One from the car and the other one from AAI. BUT NO MORE "AUDIOPLAYER" voice...

Da: @. Inviato: 30 Maggio 2021 02:55 A: @. Rispondi a: @. Cc: @.; @.*** Oggetto: Re: [hufman/AndroidAutoIdrive] App no longer connceting to car (#197)

The app will run as Audioplayer by default. The most recent release only supports Audioplayer mode. After upgrading to a recent build, it will automatically run in Spotify mode if a new enough Spotify is detected. That Force Spotify Mode checkbox allows it to run as Spotify even without new Spotify installed. If you have old Spotify installed, then both the official Spotify app and this app's Spotify icon will show up. If you don't have any Spotify installed, then the car will still have a Spotify icon installed from this app. So, to reduce confusion, it will only run as Spotify in the right condition by default.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/hufman/AndroidAutoIdrive/issues/197#issuecomment-850921185, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASMCODYCTRFFPIGXQ27WNITTQGEHZANCNFSM4W3T7RHA.

hufman commented 3 years ago

Indeed, that is the confusing icon situation that I hope to avoid. If you want it to run as Audioplayer mode now, you'd also need to uncheck that checkbox. May I ask why you want it to run as Audioplayer? I think Spotify mode includes better functionality.

donsaimon commented 3 years ago

I would prefer to have the 'audioplayer' voice as Spotify voice only is confusing... If I unceck the voice "show always as spotify in ID5+" the audioplayer voice does not appear. and it does not appear even if I check the box...

Da: @. Inviato: 30 Maggio 2021 16:58 A: @. Rispondi a: @. Cc: @.; @.*** Oggetto: Re: [hufman/AndroidAutoIdrive] App no longer connceting to car (#197)

Indeed, that is the confusing icon situation that I hope to avoid. If you want it to run as Audioplayer mode now, you'd also need to uncheck that checkbox. May I ask why you want it to run as Audioplayer? I think Spotify mode includes better functionality.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/hufman/AndroidAutoIdrive/issues/197#issuecomment-851013259, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASMCOD2YSYM3KPARBJGT5M3TQJHBVANCNFSM4W3T7RHA.

hufman commented 3 years ago

Alright, to run as Audioplayer mode, just keep the old Spotify installed (or uninstall entirely) and then uncheck the advanced option.

Please check out the discussion in #251, where I'm planning to add an option to run as Spotify mode, to retain the global coverart functionality, but use the old Audioplayer main screen for the compact layout.

donsaimon commented 3 years ago

What do you mean with "old Spotify version" which version should I install? I often have a bug: no more possible randomly to navigate (browse) between Spotify songs of my playlist: the "now playing" button is greyed. I have read that it is a quite common issue, but I have not understood if there is a fix or something I can do to avoid it. Thanks a lot Best regards Simone

Da: @. Inviato: 30 Maggio 2021 17:40 A: @. Rispondi a: @. Cc: @.; @.*** Oggetto: Re: [hufman/AndroidAutoIdrive] App no longer connceting to car (#197)

Alright, to run as Audioplayer mode, just keep the old Spotify installed (or uninstall entirely) and then uncheck the advanced option.

Please check out the discussion in #251https://github.com/hufman/AndroidAutoIdrive/issues/251, where I'm planning to add an option to run as Spotify mode, to retain the global coverart functionality, but use the old Audioplayer main screen for the compact layout.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/hufman/AndroidAutoIdrive/issues/197#issuecomment-851019182, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASMCODYNMHJDHFW4XJQB75LTQJMAJANCNFSM4W3T7RHA.

donsaimon commented 3 years ago

Dear Walter, sorry for disturbing you. I have an issue with WhatsApp song browsing. Often the button "now playing" is disabled (greyed) and there is no way to enable again. When this issue occurs, I have noticed that in your app the voice "possibility to navigate in Spotify library" is unchecked and it is not possible to check the box again (see attached image). I read something related to this issue in the past, but I don't know if there is a fix, or something that I can do to avoid it or something that I could do while in the car to resolve the issue. I have tried to uncheck "Bluetooth audio" voice and then check the "app" voice in the car menu to restart your app, but it did not work... Thank you Best Regards, Simone

Da: @. Inviato: 30 Maggio 2021 17:40 A: @. Rispondi a: @. Cc: @.; @.*** Oggetto: Re: [hufman/AndroidAutoIdrive] App no longer connceting to car (#197)

Alright, to run as Audioplayer mode, just keep the old Spotify installed (or uninstall entirely) and then uncheck the advanced option.

Please check out the discussion in #251https://github.com/hufman/AndroidAutoIdrive/issues/251, where I'm planning to add an option to run as Spotify mode, to retain the global coverart functionality, but use the old Audioplayer main screen for the compact layout.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/hufman/AndroidAutoIdrive/issues/197#issuecomment-851019182, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASMCODYNMHJDHFW4XJQB75LTQJMAJANCNFSM4W3T7RHA.

hufman commented 3 years ago

Please look in discussion #255 for links to download the latest version of Spotify with official IDrive support. With this version is installed, AAI will run by default as Audioplayer. It sounds like you installed this version already, and just need to uncheck the Appear As Spotify button in AAI.

If there is an error connecting to Spotify to browse, there should be an error message there with more details. You may be experiencing #254 (problems browsing Spotify on a second connection attempt), try force closing Spotify and connecting again. If you are in this state, Spotify doesn't respond properly to the connection attempt, and will time out after some 30 seconds or so, and the error field in the Music tab will stay blank until this time out happens.

donsaimon commented 3 years ago

Thanks for you answer Walter. For the 1st point, yes, I tried to install the old last Spotify version officially compatible with iDrive, and I had autoplayer voice again, but I installed the most recent Spotify version again (no more audioplayer voice) because in this case your app provides a better user interface with the possibility to skip forward the song, so I definitely will keep latest Spotify version.

With respect to the Spotify browsing issue, in my case it seems to be randomic and not linked to the number of previous connections... If I have understood well, the solution is to kill Spotify via phone. It is very uncomfortable when I am driving.. Do you think you will be able to fix this problem in the next versions of your app? Did you experienced this issue? Does it happen to everyone or it depends from e.g. BMW app version or other?

Da: @. Inviato: 2 Giugno 2021 22:25 A: @. Rispondi a: @. Cc: @.; @.*** Oggetto: Re: [hufman/AndroidAutoIdrive] App no longer connceting to car (#197)

Please look in discussion #255https://github.com/hufman/AndroidAutoIdrive/discussions/255 for links to download the latest version of Spotify with official IDrive support. With this version is installed, AAI will run by default as Audioplayer. It sounds like you installed this version already, and just need to uncheck the Appear As Spotify button in AAI.

If there is an error connecting to Spotify to browse, there should be an error message there with more details. You may be experiencing #254https://github.com/hufman/AndroidAutoIdrive/issues/254 (problems browsing Spotify on a second connection attempt), try force closing Spotify and connecting again. If you are in this state, Spotify doesn't respond properly to the connection attempt, and will time out after some 30 seconds or so, and the error field in the Music tab will stay blank until this time out happens.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/hufman/AndroidAutoIdrive/issues/197#issuecomment-853359610, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASMCOD2K4OQWCTKWX7YGZOTTQ2HT7ANCNFSM4W3T7RHA.

hufman commented 3 years ago

I only experience the issue occasionally, maybe once a month or so. It only impacts Spotify, not any of the other music apps I use. I definitely intend to try to resolve it before the next release. Please watch that #254 issue for updates.

donsaimon commented 3 years ago

Yes me too have experienced only a few times, but when it happens it is quite annoying. Thanks a lot for your effort trying to solve this issue, I'll follow #254 hoping for positive updates. Do you think you will be able to solve it in the next days/weeks or it will take more time (months)? Anyway I noticed that connection failures have become very very rare with latest version of AAI: very good, thank you!

Da: @. Inviato: 2 Giugno 2021 22:48 A: @. Rispondi a: @. Cc: @.; @.*** Oggetto: Re: [hufman/AndroidAutoIdrive] App no longer connceting to car (#197)

I only experience the issue occasionally, maybe once a month or so. It only impacts Spotify, not any of the other music apps I use. I definitely intend to try to resolve it before the next release. Please watch that #254https://github.com/hufman/AndroidAutoIdrive/issues/254 issue for updates.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/hufman/AndroidAutoIdrive/issues/197#issuecomment-853372666, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASMCOD3I2VFV54V7XXWNNQLTQ2KLNANCNFSM4W3T7RHA.

donsaimon commented 3 years ago

Dear Walter, I have an issue with the music app "Energy Radio" that I use via AAI app. If I select one of the channels transmitted by Energy Radio (e.g. Energy Rock) and then I power off the car and I power on the car after some hour, Energy Radio is off, and I have to select again a channel to listen at music... (by pressing the magnifying glass symbol on the left bar menu). Do you have some suggestion? Thank you. Best Regards, Simone

Da: @. Inviato: 2 Giugno 2021 22:48 A: @. Rispondi a: @. Cc: @.; @.*** Oggetto: Re: [hufman/AndroidAutoIdrive] App no longer connceting to car (#197)

I only experience the issue occasionally, maybe once a month or so. It only impacts Spotify, not any of the other music apps I use. I definitely intend to try to resolve it before the next release. Please watch that #254https://github.com/hufman/AndroidAutoIdrive/issues/254 issue for updates.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/hufman/AndroidAutoIdrive/issues/197#issuecomment-853372666, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASMCOD3I2VFV54V7XXWNNQLTQ2KLNANCNFSM4W3T7RHA.

hufman commented 3 years ago

If the Browse functionality is working, then the car app is successfully connected to the music app, and the music app itself isn't behaving nicely. I experience this with the RMC Radio Monte Carlo app, and there isn't much the car app can do. Even when trying to control RMC with Android Auto, it jumps right to the Browse functionality and doesn't offer an option for resuming playback. Install the Android Auto app on your phone and try using Energy Radio in it and see what it does. The best thing to do would be to write to Energy Radio and suggest they support resuming playback when Android Auto connects: It's inconvenient (and relatively unsafe) to fiddle with the Android Auto interface just to get music playing again, so resuming the previous playback would make sense.

donsaimon commented 3 years ago

Understood Walter thank you. So it is an Energy Radio app issue. P. S. Radio Monte Carlo is an Italian radio. Glad you appreciate it.

Da: @. Inviato: 4 Giugno 2021 21:34 A: @. Rispondi a: @. Cc: @.; @.*** Oggetto: Re: [hufman/AndroidAutoIdrive] App no longer connceting to car (#197)

If the Browse functionality is working, then the car app is successfully connected to the music app, and the music app itself isn't behaving nicely. I experience this with the RMC Radio Monte Carlo app, and there isn't much the car app can do. Even when trying to control RMC with Android Auto, it jumps right to the Browse functionality and doesn't offer an option for resuming playback. Install the Android Auto app on your phone and try using Energy Radio in it and see what it does. The best thing to do would be to write to Energy Radio and suggest they support resuming playback when Android Auto connects: It's inconvenient (and relatively unsafe) to fiddle with the Android Auto interface just to get music playing again, so resuming the previous playback would make sense.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/hufman/AndroidAutoIdrive/issues/197#issuecomment-854956199, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASMCODYRKHVTCYYO74RQDE3TRETDHANCNFSM4W3T7RHA.

berseker commented 3 years ago

I noticed you are talking about "energy radio" app, below a screenshot showing some strange behaviour of this app (I do not know if the cause it's the app itself, or AAI not tracking properly the tags given by this app)

image

hufman commented 3 years ago

AAI logs the tags that it receives from the app, look in your adb logcat for the keyword MediaMetadata. The PhoneUI player uses the same code, so you can leave it connected to your computer to watch the logs while trying different songs or apps.

berseker commented 3 years ago

https://pastebin.com/8iCrDi8G here is the log of the minutes I was testing the app

hufman commented 3 years ago

The log didn't catch anything, because it only logs if the MediaMetadata's MEDIA_ID has changed. This app doesn't provide very much metadata at all: Parsing MediaMetadata Bundle{ android.media.metadata.DISPLAY_SUBTITLE -> Tout l'univers - Gjon's Tears, android.media.metadata.COMPILATION -> Energy Basel, android.media.metadata.ALBUM_ART_URI -> https://cdn.energy.ch/energych-broadcast/covers/songs/500x500-c-q40/32719_1621237106.jpg, android.media.metadata.DISPLAY_TITLE -> Energy Basel, android.media.metadata.ALBUM -> Tout l'univers } For this song, for example, Tout l'univers is the song's title (and I suppose the name of the Single album) and Gjon's Tears is the artist. There isn't a good generic way to extract the artist from this (I definitely don't want to start special-casing parsing logic for each app), but the full DISPLAY_SUBTITLE might be able to be displayed. I'll try to come up with a generic way to improve this, but the Energy app really should be emitting proper data.

berseker commented 3 years ago

I would leave a comment on the app page on Google Play if I would be able to express properly which is the problem of their app :D

berseker commented 3 years ago

@hufman Much Better :) IMG_20210606_113408

donsaimon commented 3 years ago

How may I have this layout???

hufman commented 3 years ago

Which layout do you refer to? The screenshots show the NRJ Energy Radio app, the AAI Spotify mode playback screen, and the ID6L home screen music tile.

donsaimon commented 3 years ago

Yes, exactly

Da: @. Inviato: 6 Giugno 2021 16:53 A: @. Rispondi a: @. Cc: @.; @.*** Oggetto: Re: [hufman/AndroidAutoIdrive] App no longer connceting to car (#197)

Which layout do you refer to? The screenshots show the NRJ Energy Radio app, the AAI Spotify mode playback screen, and the ID6L home screen music tile.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/hufman/AndroidAutoIdrive/issues/197#issuecomment-855411879, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASMCOD6SUXQEKACDSBEPLH3TRODYJANCNFSM4W3T7RHA.

hufman commented 3 years ago

This particular type of instability seems resolved, so I'll close it out.

donsaimon commented 2 years ago

Dear Walter, it would be useful to mark as read all the messages at once, without having to open every single message and mark it as read. Do you think it is possible? Thank you Best Regards, Simone