Les Vogel
Les Vogel

Reputation: 7132

Android MediaRouter Lockscreen

We have created lock screen controls for our Chromecast app but the controls will not show up on the lock screen. We are using the RemoteControlClient to implement the lock screen widget but we don't know why it isn't working.

Upvotes: 3

Views: 419

Answers (1)

Les Vogel
Les Vogel

Reputation: 7132

Make sure you have set the ApplicationSession options to tell the Google Cast SDK that you have implemented your own lock screen controls:

  mSession.setApplicationOptions(0);

Make sure you are getting the transient audio focus from the AudioManager:

mAudioManager.requestAudioFocus(null, AudioManager.STREAM_MUSIC,
                    AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK);

Also take a look at these SO Q's: Widget on Lockscreen, LockScreen for Android

Upvotes: 3

Related Questions