All BMWs Unofficial Android app to add more music apps and phone messages via BMW Connected - Bimmerfest - BMW Forums



Go Back   Bimmerfest - BMW Forums > The Best of Bimmerfest! > BMW Coding and Programming

BMW Coding and Programming
Discuss coding options and features on your BMW here.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-08-2019, 04:06 PM
hufman hufman is offline
Registered User
Location: San Jose, CA
 
Join Date: Aug 2019
Posts: 5
Mein Auto: Mini Cooper JCW
Unofficial Android app to add more music apps and phone messages via BMW Connected

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.

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! https://github.com/hufman/AndroidAutoIdrive_a_
Reply With Quote
Sponsored Links
Advertisement
 
  #2  
Old 08-09-2019, 09:00 AM
Phil4819 Phil4819 is offline
Registered User
 
Join Date: Jul 2019
Posts: 4
Mein Auto:
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.
Reply With Quote
  #3  
Old 08-09-2019, 11:15 AM
Maxwell4321 Maxwell4321 is offline
Registered User
Location: uk
 
Join Date: Jan 2014
Posts: 76
Mein Auto: e64
Is this for NBT or NBT EVO ?
Reply With Quote
Sponsored Links
Advertisement
 
  #4  
Old 08-09-2019, 12:45 PM
hufman hufman is offline
Registered User
Location: San Jose, CA
 
Join Date: Aug 2019
Posts: 5
Mein Auto: Mini Cooper JCW
@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!
Reply With Quote
  #5  
Old 08-12-2019, 11:34 PM
hufman hufman is offline
Registered User
Location: San Jose, CA
 
Join Date: Aug 2019
Posts: 5
Mein Auto: Mini Cooper JCW
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.
Reply With Quote
  #6  
Old 08-13-2019, 02:57 PM
murzik murzik is offline
Registered User
Location: Chicago
 
Join Date: Oct 2014
Posts: 19
Mein Auto: BMW
Hi there.
I see icons in NBT and notifications from the phone are coming through, but unfortunately I can't operate phone from the car. Phone is just not doing anything. I have Samsung Note 8 with Oreo
Reply With Quote
  #7  
Old 08-19-2019, 12:21 AM
FlemmingS FlemmingS is offline
Registered User
 
Join Date: Aug 2019
Posts: 5
Mein Auto:
Great app, will try it today.

Is there any help on how to compile the app myself as i want to try out the google maps. Or would it be possible to to add a feature in your app where the user can add this api key ?

Br. Flemming

Last edited by FlemmingS; 08-19-2019 at 06:47 AM.
Reply With Quote
  #8  
Old 08-19-2019, 06:51 AM
FlemmingS FlemmingS is offline
Registered User
 
Join Date: Aug 2019
Posts: 5
Mein Auto:
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,
Reply With Quote
  #9  
Old 08-20-2019, 01:55 PM
Leo12318 Leo12318 is offline
Registered User
 
Join Date: Jul 2019
Posts: 1
Mein Auto:
I like to support your project, I think class. I have a F31 2013 with a NBT system. I have to say it works, unfortunately not everything but hope that more will happen soon.
Reply With Quote
  #10  
Old 08-21-2019, 07:53 AM
Flausatu Flausatu is offline
Registered User
 
Join Date: Aug 2018
Posts: 6
Mein Auto:
Quote:
Originally Posted by FlemmingS View Post
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!!
Reply With Quote
  #11  
Old 08-21-2019, 01:22 PM
FlemmingS FlemmingS is offline
Registered User
 
Join Date: Aug 2019
Posts: 5
Mein Auto:
Quote:
Originally Posted by Flausatu View Post
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!!
Thanks for the confirmation :-)

I hope someone can get the google maps to work, so i can see how "bad" it works (10 fps) , or if i should go for an hw upgrade.
Reply With Quote
  #12  
Old 08-22-2019, 12:07 AM
hufman hufman is offline
Registered User
Location: San Jose, CA
 
Join Date: Aug 2019
Posts: 5
Mein Auto: Mini Cooper JCW
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/statu...79450413236226
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?
Reply With Quote
  #13  
Old 08-22-2019, 08:25 AM
Flausatu Flausatu is offline
Registered User
 
Join Date: Aug 2018
Posts: 6
Mein Auto:
Quote:
Originally Posted by hufman View Post
...you almost always should disable Request Audio Context and tell the car to listen to the phone's music over Bluetooth. ..
Can u please explain how to do this?
I don't know how to disable Request Audio Context..is that on the phone or in tha car settings? I have Android 9 Pie.
Reply With Quote
  #14  
Old 08-23-2019, 03:05 PM
FlemmingS FlemmingS is offline
Registered User
 
Join Date: Aug 2019
Posts: 5
Mein Auto:
Quote:
Originally Posted by hufman View Post
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/d...dk/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
Reply With Quote
  #15  
Old 08-24-2019, 02:36 AM
richone richone is offline
Registered User
Location: Madrid
 
Join Date: May 2006
Posts: 7
Mein Auto: M3 e30
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
Reply With Quote
  #16  
Old 08-24-2019, 06:08 AM
FlemmingS FlemmingS is offline
Registered User
 
Join Date: Aug 2019
Posts: 5
Mein Auto:
Quote:
Originally Posted by richone View Post


Request audio focus deactivated

Hi richone,

Where do you disable this ?

thanks
Reply With Quote
  #17  
Old 08-24-2019, 06:14 AM
richone richone is offline
Registered User
Location: Madrid
 
Join Date: May 2006
Posts: 7
Mein Auto: M3 e30
Quote:
Originally Posted by FlemmingS View Post
Hi richone,



Where do you disable this ?



thanks
Open the app then...

Enviado desde mi SM-G950F mediante Tapatalk
Reply With Quote
  #18  
Old 08-25-2019, 12:58 PM
hufman hufman is offline
Registered User
Location: San Jose, CA
 
Join Date: Aug 2019
Posts: 5
Mein Auto: Mini Cooper JCW
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!

Last edited by hufman; 08-25-2019 at 09:42 PM.
Reply With Quote
Reply

See More Related BMW Stories

Tags
android, connecteddrive


Forum Navigation
Go Back   Bimmerfest - BMW Forums > The Best of Bimmerfest! > BMW Coding and Programming
Today's Posts Search
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On



Forum Jump


All times are GMT -7. The time now is 03:49 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
vBulletin Security provided by vBSecurity v2.2.2 (Pro) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
© 2001- VerticalScope Inc. All rights reserved.