BimmerFest BMW Forum banner
Status
Not open for further replies.

Unofficial Android app to add more music apps and phone messages via BMW Connected

69K views 205 replies 61 participants last post by  dirkpajonk 
#1 · (Edited)
For the last year or two, I've been working on reverse engineering the BMW Connected Apps protocol, which is used to add functionality to the car's dashboard from the phone app. I really like Connected Apps, and how they have much tighter integration into the car features than other cars' remote display technologies, and so I've built my own Android app that uses this protocol to add more phone music sources and show phone notifications in the car.

As an example, this app exposes Plex and DSub music libraries so that you can browse around them in the IDrive interface, and easily switch between other music apps on the phone. I also have phone notifications showing up in the car, including popups when they arrive and the ability to Mark as Read and a few other notification actions.

Any BMW or Mini after 2015 with the navigation option (which should include Connected Apps functionality) should be compatible. The main requirement is that your car's Bluetooth menu has the Apps option, or that your older ID4 car has the Connection Assistant menu.

So far I've been developing it against my 2016 Mini Cooper, and a friend has gotten it working in a 2015 BMW i3 and another friend has it working in his 2019 3-series. I'm hoping to find more users to test it out to make sure it has a bug-free 1.0 release. I also hope that this app may be useful in daily driving!

Please try it out, and let me know how you like it! GitHub or Google Play

Updates:
The project has changed a lot over the last 3 years, and is now much easier to use! Some of the previous connection advice is no longer necessary, and the app itself should guide you through any necessary setup steps. In particular:
  • Downgrading Spotify is no longer necessary, the app now includes API access to control all versions of Spotify (as of 1.2.1). Relatedly, Spotify no longer needs to be started manually.
  • Connected Classic no longer needs to be installed, you only need the main Connected app installed (as of 1.2.2)
  • The app now detects the proper audio context mode to use, and the user no longer needs to decide which mode to use (as of 1.2.2)
  • MyBMW is supported (as of 1.3)
 
See less See more
#2 ·
Hi there. I have a 2016 F32. If your app is 'uninstallable' I'll give it a go. I have a Spotify account and it would be good to play my music from there, and also I prefer the Google Maps interface to the native BMW one. I'd give you feedback on it as well if it will help you. Cheers.
 
#4 ·
@Phil4819 The app does no permanent modifications to the car, acting exactly as any other BMW Connected App like the official Spotify or iHeartRadio apps. Your 2016 F32, which I believe runs these apps over the USB connection, would benefit, because this app supports controlling Spotify (at least, a slightly older version) through the app connection over USB while playing the music through Bluetooth.

I haven't developed the Google Maps portion very much, and I don't provide builds of the app with the map enabled, because it's against the Google license to show a map in the car. You would need to compile the app yourself and insert a Google API key, but the instructions are posted.
It has basic searching and routing, and I have been requested to add some other features like searching on the phone. Your USB connection would be able to handle 10fps or so, but future cars that connect over Bluetooth perform unacceptably slow.

@Maxwell4321
I believe both NBT and NBT Evo should be compatible, I think NBT added the Android support that was missing from CIC, which can only run smart apps from iPhone.

Please try it out and let me know how it works!
 
#5 ·
I am tracking down a problem with the Request Audio Context feature. Until I figure it out, I recommend disabling it and using the Bluetooth music source.
The symptoms seem to be: Every Connected App freezes when the car requests that the phone automatically resume music playback through this app's audio context. If you experience this, tell the car to listen to the Bluetooth music connection, disable the Request Audio Context switch, and reconnect the phone's USB or Bluetooth connection.
 
#8 ·
Okay, so i have installed the app, and the connected drive.

Ekstra menys is showing up in my media meny, and i can control youtube. However spotify is not working (and is not showing an arrow in your app) . It is installed on my phone.

How is the app supposed to work ? because i have no sound when selecting the "audioplayer" eg. youtube,
 
#10 ·
Okay, so i have installed the app, and the connected drive.

Ekstra menys is showing up in my media meny, and i can control youtube. However spotify is not working (and is not showing an arrow in your app) . It is installed on my phone.

How is the app supposed to work ? because i have no sound when selecting the "audioplayer" eg. youtube,
Same situation here. I can control YouTube but no sound. BMW F10 2015 NBT. Tis will be a great app when everything will work. Keep up the good work!!
 
#12 ·
For NBT (which requires that you connect over USB), and if you are using a new phone (Oreo or newer), you almost always should disable Request Audio Context and tell the car to listen to the phone's music over Bluetooth. That's how I run it, in fact. I'm still tracking down an issue with the Audio Context, and I really want to fix that before releasing another version.

The Spotify app enforces a whitelist of which apps can control it, as of this year. The Readme has a link to where to download an older version of Spotify that does work.

You can find some example videos of the maps on my Twitter: https://twitter.com/snes_rocks/status/1088979450413236226
I provide instructions on the page for how to build the app with a key added, and please let me know if something is missing, but I'm pretty sure I'm not allowed to distribute an app that has support enabled. I could perhaps implement a different map provider, such as Mapbox, but that may not be any better than the car's built-in maps.
I think Google Maps may provide better traffic and POI information than the NBT, but what features are you most interested in with Google Maps support?
 
#15 ·
Hi Hufman,

This is a great work, congratulations!!

I post my config and things that work or not:

2016 F11 - NBT

Galaxy s8 - Pie

BMW connected classic app

Spotify v. 8.5.18.932

Request audio focus deactivated

My findings:

Message notification working

Audio through audioplayer not working. There is 2 audioplayer options in the menu, only one shows vlc ,YouTube, etc but spotify not showing.

Selecting my phone in media menu-> external devices -> s8 bluetooth , spotify plays . Then if VLC, YouTube,etc is selected the app that works is spotify.

Through bluetooth audio I never see the album art, but if while playing I select the notifications options I can see the song and the album art (attached images).

Hope this can help.

Thank you



Enviado desde mi SM-G950F mediante Tapatalk
 
#18 · (Edited)
Happy weekend! Thank you for the kind words. I like seeing the pictures of it working in other peoples' cars!

FlemmingS:
I don't have voice input figured out, I don't think my car supports it. I need to record an app on my phone using that feature to figure out how that feature works in the car's protocol, and then I can use it in my app. Maybe my next car will support it and I will figure it out then :)
I have only implemented basic Place searching and basic routing, showing a route on top of the map to navigate there. I don't have turn-by-turn instructions or announcements, because it's against the Maps EULA to replicate the Google Maps experience. I don't have any integration access to post any navigation information into the car's dashboard or HUD either, I only support posting the song information. The unofficial status means I am limited in what I can do.
There is some code in the BMW app that would (I believe) let me add new POI information to the car, I think it's used by the electric vehicles to add charger locations. I can't test it currently, my Mini rejects any attempts to call those APIs, but please suggest ideas for what I can do with the ability to add new POIs to the car's map :)

About the Maps API key:
You don't need to enabled Application Restrictions, since it will only be on your phone and not published to the store or anything. It's complicated to set up, and requires registering the cert that you are building the app with, which is difficult in development.
If you choose to enable API Restrictions, that brings up the list where you would choose the specific APIs: Maps SDK for Android, Places API, and Directions API.
The app is already set up to use the API key if you put it in the right place (~/.gradle/gradle.properties as described in the README). The code will automatically load it in the 2 or 3 places that need it when the app gets built.
After building the app, you should find several APKs deep in the output folder, somewhere in app/build/outputs/apk/gmapNonalytics/debug/ for example. You would need to uninstall the version you downloaded from Github, and then you should be able to "adb install" the APK file that you built.

richone:
The two Audioplayers showing up is because the BMW Connected Classic Audioplayer is also enabled, you can disable it before plugging in the phone, but I think it doesn't remember that setting after the app shuts down. One method to permanently disable it is that you could install BMW Connected and Mini Connected Classic: The Classic app will only launch the Audioplayer if it is connected to the same brand of car. The new BMW Connected won't launch its own iHeartRadio or Spotify app unless it's connected over Bluetooth.

I was able to get iVoox and VLC to work in my car: iVoox needed initial setup for favorite channels and VLC needed permission to browse the directories but then it worked. Youtube apparently no longer gives me any metadata information, but it does allow Prev/Next as long as a video is loaded before Youtube is selected in my app. I should fix the bug where the Prev/Next icons don't get updated when Youtube loads a video, since Youtube doesn't send any updated metadata which is what I am watching for.

Because my app isn't requesting audio focus (I apologize, I call it audio context in the code and didn't say the correct option name earlier), the Media button will bring up the Bluetooth screen instead of my app. I'm not sure if it's possible to change that behavior :( However, you can assign the music app to a dashboard shortcut button, which should make it more convenient to use.
The Bluetooth music source is only a workaround for the USB audio connection, I can't add any extra information there. More detailed information, like cover art, is only available in the actual app's screen. Once the car is listening to the Bluetooth connection, you shouldn't need to revisit the Bluetooth screen again, all the interaction should work through the app screen.
There may be a way to get the cover art to show up in the side panel, since I can already put the title information there, I should investigate that sometime...

The Spotify app you are using is too new and doesn't allow my app to control it, there's a link from the README to download an older version that does work. You may need to pull down on the music app list to update the list after installing it, and then it should show the Play arrow to indicate that it is connectable. It should also show the directory and magnifying glass symbols to show browseable and searchable status.


Thank you again for helping test and improve my app :) It makes me so happy to hear of people enjoying my app that I've spent so long building!
 
#19 ·
I just released version 1.0! Check it out: https://github.com/hufman/AndroidAutoIdrive/releases/tag/1.0

I added some robustness improvements to the audio app, better Custom Action names in Spotify and Rocket Player, and some usability improvements for the Notifications.

The next version will work on adding support for new versions of Android, which should remove that scary warning from Play Protect.
 
#21 ·
Waze is even harder than Google Maps, because I can't embed arbitrary apps inside my app. I can embed a Maps widget, and use the Google Maps api to add some functionality to behave similarly to Google Maps, but I can't embed Google Maps proper. This means, for example, I don't have access to your Google Maps favorite places or search history.
There must be some way that Android Auto is generating a virtual screen and then sharing it somehow to host other apps, but I don't know how to do that.
Any such effort would _definitely_ be against EULAs lol
 
#24 ·
otteporihs:
I can't tell for certain, I haven't tested against iDrive 7 yet. What year is it? Do the other BMW apps, such as Calendar, show up in the car too? I really hope they didn't get rid of this feature in the new iDrive!
Are you able to pull a logcat file for me? I wonder if there are any messages about why the app can't connect... Perhaps iDrive 7 rejects the old certificates from BMW/Mini Connected Classic? If that's the case, I might know a workaround, but it would definitely be illegal and I can't share it around! Send me a logcat file (adb logcat -d > logfile.txt) with any errors from my app and I'll take a look and see what I can do. If your phone is rooted, a tcpdump would be immensely helpful, but that's harder to obtain.
 
#27 ·
otteporihs:
From what I have read online, iDrive 7 doesn't support this protocol at all! This is very disappointing to me, I hope my next car is still running 6!

Abbey28:
This app can't change anything about the Bluetooth information shown from the phone in the car. Instead, it adds a new music app to the car to control some other music apps on the phone. Hope this helps explain it!
You could try unpairing your phone, and then changing the phone's Developer Options > Bluetooth Settings to enable AVRCP 1.6, rebooting the phone, and then pairing again. My car doesn't support the new version, but yours is newer and this might add some extra features :)
 
#28 ·
I just released version 1.1! The main improvement is to compile against Android Pie, which removes the Play Protect warning about the old app version. It does interfere with the ability for the app to notice the car connection while the app is closed, but I've built a workaround that relies on the new Connected app. Check it out and let me know how it works!
 
#29 ·
Hello, your project is great!
I keep my fingers crossed for more functionality!

In my case i see additional menus, I can push next/previous/play, but i don't hear any sound :(

Notifications also doesn't working.

About suggestion about POIs - of course speed cameras :)

Do you think is it possible to read traffic information from google maps and put it to BMW navigation?
 
#30 ·
Hello,

First of all, thanks for putting this together. I was on the verge of buying an iPhone!

I've been driving around all day today using your app and it seems to be working very well. I am not sure if this is coincidence or not, but the old classic app and the new connected app are actually working together for the first time now (e.g. I can send destinations direct from the Connected app to the GPS, without using the message).

I was wondering if it is possible to remove the limitation on using the 'Audioplayer' app when the car is in motion? It would be great to be able to change the Spotify playlist etc. without putting the car in park and applying the handbrake. Right now when in motion it will lock me out of the app and revert to the Bluetooth music player.


Cheers.
 
#31 ·
preiswert: By default, the app only controls the other music apps but relies on the phone's existing audio connection to the car, so you may need to switch the phone and car to play music over Bluetooth.
Thanks for the speed camera suggestion! When I figure out the map system, I'll work on setting that up :)
I don't think I can add new map layers, only Points of Interest, so I don't think I can add new traffic information.

generalk:
I sincerely apologize, I hear your plight, but the BMW Apps Speedlock is out of my control :( You should look into whether it can be coded away somehow with Bimmertech or something more advanced. I think it's ridiculous, it forces you to be more distracted by using your phone instead of the car's interface.
I'm happy to hear about running both Connected and Connected Classic of the same brand! When I tried it on an IDrive 5 car over Bluetooth, it managed to reliably crash/reboot the headunit, but perhaps that was fixed at some point, or the USB connection is better.
 
#33 ·
I continue to work on it :) The next big feature, controlling any running music app instead of only a specific list of apps, is pretty much ready to release. However, I just gained access to an IDrive 6 system, so I'm testing and making a few small fixes before releasing the next version.
Thanks for checking in!
 
#35 ·
Hello, this is a very nice work. Thanks for your contributions. However I find it very hard to compile an android app with your instructions. I tried with Android Studio 3.5 and I get class not found exception. Also build menu does not have a make project button, but it has a make module button.
 
#38 ·
Wow, I found this by chance and it works like charm in my F46 2017. Finally Spotify in the iDrive (something that the official BMW connected app never managed to work). GREAT JOB!!!
I even get Youtube (Audio only), but no other app is working. Any hints or tipps?
 
Status
Not open for further replies.
You have insufficient privileges to reply here.
Top