BimmerFest BMW Forum banner
1 - 20 of 207 Posts

· Registered
Joined
·
57 Posts
Discussion Starter · #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)
 

· Registered
Joined
·
5 Posts
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.
 

· Registered
Joined
·
57 Posts
Discussion Starter · #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!
 

· Registered
Joined
·
57 Posts
Discussion Starter · #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.
 

· Registered
Joined
·
5 Posts
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,
 

· Registered
Joined
·
11 Posts
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!!
 

· Registered
Joined
·
57 Posts
Discussion Starter · #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?
 

· Registered
Joined
·
5 Posts
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?
I'm interested in navigation, mening, i press my voice button on the steering wheel, and speak a address. Then i would like to see the directions and maps info in the display of the car, and the google voice via the car. That's it. :)

From what i understand i need to:

Get myself a gmap api key (done)
Should i "Restrict the API key" ??
Install android studio (Done)
Should i include the API key my app (according to https://developers.google.com/maps/documentation/android-sdk/get-api-key - > Add the API key to your app) ?
load your source files (trying , i get a lot of errors when laoding the project)
Somehow find and change the gmap api key ? (~/.gradle/gradle.properties as a property named )
Then (This key should have access to; Maps SDK for Android, Places API, and Directions API) , how is this done ? Is this enabled by default by google ?

Well, will try to solve some of this in the following days :)

Thanks for your time
 

· Registered
Joined
·
11 Posts
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
 

· Registered
Joined
·
57 Posts
Discussion Starter · #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!
 

· Registered
Joined
·
57 Posts
Discussion Starter · #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.
 
1 - 20 of 207 Posts
Top