Android Question Broadcasting when screen locked

Robert Valentino

Well-Known Member
Licensed User
Longtime User
I have been banging my head against the wall trying to get my music player talking nicely to my car radio.

I gotten everything working as nicely as possible (Play / Pause - Next / Previous keys all work and I can display the MP3 information on the car radio display lines)

Using MyPhoneWakeState.KeepAlive(False) in my Main and a service to play the music everything works fine (after some time the screen dims but does not go completely off)

Using MyPhoneWakeState.PartialLock in my Main and a service to play the music everything works fine (after some time the screen goes completely off)


When the screen goes completely off (locking it) the keys work (Play / Pause - Next / Previous keys all work) but the MP3 information stops showing on the car screen. Even when I turn the screen back on NOTHING every again appears again unless I turn the car off and back on to reconnect.

Now I thought that I was doing something wrong but when I use the default Music Player on my Samsung S3 the SAME exact problem happens.

So there is some type of communication being lost when the screen goes off / gets locked.

Strange that the music still plays and that all the keys still work but the Broadcast messages I am sending:
"com.android.music.playstatechanged",
"com.android.music.metachangedseem", seem to stop being received by the car radio.

Is there something I need to do to keep the broadcasting of messages alive when the screen gets locked?

BobVal
 

Robert Valentino

Well-Known Member
Licensed User
Longtime User
I now display a blank screen instead of pushing the power button.

But not sure what that is buying me.

I wanted to save power by having the screen off - I am not sure having a blank screen showing is saving anything only making it look like the screen is off.

Will keep banging at it.

Thanks
 
Upvote 0
Top