[App][5.1+][Alpha] AnyAutoAudio - Use any audio app in Auto

jvvpc

Senior Member
Dec 6, 2008
100
126
0

AnyAutoAudio
So I was tired of not being able to use the audio apps I normally use in Auto and decided to try and do something about it. This app is the result :fingers-crossed:

How does it work?
By using the notification listener permission, the app is able to access the media session of any audio app that is running. This is then passed to Android Auto, which makes it possible to control as any normal Auto app. This also means that it is necessary to run the audio app(s) first before running Auto.

I have several ideas for future features, but would like some feedback first and get rid of bugs. Take it for a spin!

Howto:
- Setup AnyAutoAudio from the app
- Open and run music app(s)
- Run Android Auto from phone or dashboard

Latest progress update & ideas for the future:
https://forum.xda-developers.com/showpost.php?p=72587291&postcount=67

Download:
https://labs.xda-developers.com/store/app/dk.jonske.AnyAutoAudio


Install AnyAutoAudio directly from apk:

If downloading the APK directly you need to allow unknown sources in Auto,

- In the Android Auto app, tap the Hamburger menu.
- Tap About.
- Tap About Android Auto header 10 times, until a toast appears thar says "Developer mode enabled". Now you can access developer mode by selecting the overflow menu dots on the top right of the handheld screen.
- Select Developer settings from the overflow menu and check unknown sources.

Source: https://developer.android.com/training/auto/testing/index.html#phone

Release notes

0.1.0
- Startup tutorial
- new settings interface
- FAQ
- Feedback
- Analytics
- Pinned apps (browsing)
https://forum.xda-developers.com/showpost.php?p=73426860&postcount=108

0.0.4
- No more need for app list! Just run the music apps and open Auto.
- Issue with controls not responding should be fixed
- Lots of bug fixes


0.0.3
- Apps already with Auto implementation is filtered out
- Queue implementation
- If audio app is destroyed, just pause
- Smaller app size
- Error include audio app name

0.0.2
- System apps now allowed in app selection.
- Basic voice control implementation. So far only "play music" seems to work ("pause", "play" etc. fails on Google's side)

0.0.1
- First alpha release
- Basic control and metadata
 

Attachments

Last edited:

jvvpc

Senior Member
Dec 6, 2008
100
126
0
Hi,

Tested and working with "Google Play Books". :good:

I suggest to try to support the FM Radio App.
Perhaps, you feel I'm fool but I like to check one DAB Radio App running in my phone... my car doesn't have DAB radio.
Great to hear it works!

Do you have a link for the app? It should work as long as the app is playing audio the standard way in android, so I'll have a look :)
 
  • Like
Reactions: escoowater

manos78

Senior Member
Jan 17, 2014
808
304
0
Do you have a link for the app? It should work as long as the app is playing audio the standard way in android, so I'll have a look :)
For the RADIO (FM) it's the stock FM App... Try it in your phone, it isn't detected in the list of Audio Apps.

Regarding the DAB App it's this:
http://play.google.com/store/apps/details?id=com.ex.dabplayer

Please, continue improving this great App!
For example, your App can send button events to the controlled App? Back, Play/Stop, Next...
 

jvvpc

Senior Member
Dec 6, 2008
100
126
0
For the RADIO (FM) it's the stock FM App... Try it in your phone, it isn't detected in the list of Audio Apps.

Regarding the DAB App it's this:
http://play.google.com/store/apps/details?id=com.ex.dabplayer

Please, continue improving this great App!
For example, your App can send button events to the controlled App? Back, Play/Stop, Next...
Ahh, the list is filtering out system apps. I will include them in the next update :)

There shouldn't be any problems with the DAB app. Have you tried it?

Yes, it will handle all button events like play, pause, next etc. I will look into if it can take special buttons some apps use :)
 
  • Like
Reactions: h3nyr

Mac31284

New member
May 19, 2017
1
1
0
Jusrt tested with local files and vlc and this works well. Its a Great idea.. Ill be a really happy camper if u can get it to pull the audio from firefox and chrome.

Youtube/netflix/hulu etc could all be nice too. But the browsers obviously would be top priority cuz then u could do anything (live tv news etc etc) in my opinion.

Regardless..Great job and idea!
keep at it. I Will report back after more experience with it.
 
  • Like
Reactions: lifestar53

manos78

Senior Member
Jan 17, 2014
808
304
0
Ahh, the list is filtering out system apps. I will include them in the next update
Great! Waiting for it! :fingers-crossed:

There shouldn't be any problems with the DAB app. Have you tried it?
No. It's a wish for the future... if your tool works, then I'll purchase the dongle.

Yes, it will handle all button events like play, pause, next etc. I will look into if it can take special buttons some apps use
It will be interesenting if you introduce some additional interaction with the audio app. :good:
 

jvvpc

Senior Member
Dec 6, 2008
100
126
0
Version 0.0.2 is now released, with system apps included and basic voice control.

Jusrt tested with local files and vlc and this works well. Its a Great idea.. Ill be a really happy camper if u can get it to pull the audio from firefox and chrome.

Youtube/netflix/hulu etc could all be nice too. But the browsers obviously would be top priority cuz then u could do anything (live tv news etc etc) in my opinion.

Regardless..Great job and idea!
keep at it. I Will report back after more experience with it.
As i have now included system apps Chrome works. Just tested it with a radio website :) The video apps wont run i the background so we cant use Android Auto at the same time, this is a Android limitation. I have read reports that some find it possible to open Youtube in Firefox though?

Great! Waiting for it! :fingers-crossed:

No. It's a wish for the future... if your tool works, then I'll purchase the dongle.

It will be interesenting if you introduce some additional interaction with the audio app. :good:
See if the Radio FM app works now :)
 
  • Like
Reactions: manos78

manos78

Senior Member
Jan 17, 2014
808
304
0
Version 0.0.2 is now released, with system apps included and basic voice control.
See if the Radio FM app works now :)
Installed! Thank you!

Results:
- App FM don't show in the list. :crying:
- Voice control: Please, explain how to use it. :confused:
- No bugs detected. :good:

Regards.
 

jvvpc

Senior Member
Dec 6, 2008
100
126
0
Installed! Thank you!

Results:
- App FM don't show in the list. :crying:
- Voice control: Please, explain how to use it. :confused:
- No bugs detected. :good:

Regards.
If a app dosent show up, it is because it is not made in the standard way Android handles media. Maybe try a different FM app from the Play store? Just find one that has a notification widget, then it should work. I dont have fm in my phone so cant test it myself :)

For the voice control, only "play music" seems to work ("pause", "play" etc. fails on Google's side). This is a requirement from Google, so couldnt update the app without including this, but will expand it furter like "Play Chrome on AnyAutoAudio". :)
 

Dec64

Senior Member
Jul 20, 2016
111
25
0
If a app dosent show up, it is because it is not made in the standard way Android handles media. Maybe try a different FM app from the Play store? Just find one that has a notification widget, then it should work. I dont have fm in my phone so cant test it myself :)

For the voice control, only "play music" seems to work ("pause", "play" etc. fails on Google's side). This is a requirement from Google, so couldnt update the app without including this, but will expand it furter like "Play Chrome on AnyAutoAudio". :)

For most android head units you can not use a different FM radio app as far as i'm aware. The DAB app does not show up either which is a big shame, oh well.
 

manos78

Senior Member
Jan 17, 2014
808
304
0
If a app dosent show up, it is because it is not made in the standard way Android handles media. Maybe try a different FM app from the Play store? Just find one that has a notification widget, then it should work. I dont have fm in my phone so cant test it myself :)
The stock FM Radio in my Moto G4 has "a notification widget". It's like any other audio app.
Please, can you provide some technical info about how you search for Apps? Can you include some logging tool inside your App?

For the voice control, only "play music" seems to work ("pause", "play" etc. fails on Google's side). This is a requirement from Google, so couldnt update the app without including this, but will expand it furter like "Play Chrome on AnyAutoAudio". :)
Great! You will start the "AudioApp" when the command "Play [AudioApp] on AnyAutoAudio" is done, or will be required to have the AudioApp already open?
 

jvvpc

Senior Member
Dec 6, 2008
100
126
0
For most android head units you can not use a different FM radio app as far as i'm aware. The DAB app does not show up either which is a big shame, oh well.
Ahh so its a unit with Android onboard? Well it should still handle the apps the same way. The way this apps works is by connecting to the MediaSession that an audio app should create, if you follow Android Docs. But apps can still play audio without this, and some does so. I have tried it with different audio apps, and so far have not found other ways :)

The stock FM Radio in my Moto G4 has "a notification widget". It's like any other audio app.
Please, can you provide some technical info about how you search for Apps? Can you include some logging tool inside your App?

Great! You will start the "AudioApp" when the command "Play [AudioApp] on AnyAutoAudio" is done, or will be required to have the AudioApp already open?
My fault :) I assumed that audio apps with notification used standard implementation, but not all does have I found. Also see answer above :)

For the filtering it works by finding apps that use the intent "ACTION_MEDIA_BUTTON". This is what an audio app is required to use to be able to handle volume and playback control, so any audio app using MediaSession will have this. Also in 0.0.3 it will filter out apps that already have Android Auto implementation :)

EDIT: Answer to last question
You will still need to have the audioapp already opened. I might be able to change that for head units but for the Auto app I can't as calling new apps will open ontop and that violates the rules..
 
Last edited:

Dec64

Senior Member
Jul 20, 2016
111
25
0
Ahh so its a unit with Android onboard? Well it should still handle the apps the same way. The way this apps works is by connecting to the MediaSession that an audio app should create, if you follow Android Docs. But apps can still play audio without this, and some does so. I have tried it with different audio apps, and so far have not found other ways :)



My fault :) I assumed that audio apps with notification used standard implementation, but not all does have I found. Also see answer above :)

For the filtering it works by finding apps that use the intent "ACTION_MEDIA_BUTTON". This is what an audio app is required to use to be able to handle volume and playback control, so any audio app using MediaSession will have this. Also in 0.0.3 it will filter out apps that already have Android Auto implementation :)

EDIT: Answer to last question
You will still need to have the audioapp already opened. I might be able to change that for head units but for the Auto app I can't as calling new apps will open ontop and that violates the rules..
So it's not possible to get the FM radio apps in question to work at all?
 

manos78

Senior Member
Jan 17, 2014
808
304
0
EDIT: Answer to last question
You will still need to have the audioapp already opened. I might be able to change that for head units but for the Auto app I can't as calling new apps will open ontop and that violates the rules..
Hi,

Perhaps a root mode to launch an App as background can be a temporal alternative.
What you think?
 

jvvpc

Senior Member
Dec 6, 2008
100
126
0
So it's not possible to get the FM radio apps in question to work at all?
Well the problem is not in the FM itself, you might be able to find other FM apps that will work. I will continue to seek solutions that will work across most apps :)

Hi,
Perhaps a root mode to launch an App as background can be a temporal alternative.
What you think?
That's a good idea! I will add it to my todo list, but will focus on the basic features for now. I will look into it when that is working properly
:good:
 

jvvpc

Senior Member
Dec 6, 2008
100
126
0
Also has anyone tried it with a head unit yet? When I use the emulator, the icons on the list of chosen apps in Auto disappears after first load. Not sure if this is a emulator error or in the app, as i don't get this on my phone :)
 

jonsat

Senior Member
Jun 24, 2009
431
132
63
Roma
App installed... works as promised. Very useful, thanks! Will test next versions for sure...
@chocolatet: as I already wrote in other thread, to restore Spotify, you must install that app from adb shell (not from Play store).