reidisaki
reidisaki

Reputation: 1524

How do you show an android activity that floats over the lock screen pattern, like pandora?

I'm trying to figure out a way to float my activity which is started from a service to float over the lockscreen pattern, kind of how pandora does it. They show the top half of their activity just showing the now playing song, and pause and skip controls.

I'm able to show an activity but it covers the entire lockscreen pattern. I have already tried using theme.transparent and this didn't show up at all on the lockscreen but it did show up after i unlocked the phone.

The pandora widget seems to be able to unlock the pattern and show their widget in the top half of the screen

Are they using a lockscreen widget to do this?

Thanks,!

Upvotes: 0

Views: 957

Answers (3)

Keepon
Keepon

Reputation: 11

I have not seen the pandora.I know another way that can make you view float over lockscreen.

1.just write a service 2.use WindowManager to add you view to window with a high priority type ,just like wp.type = WindowManager.LayoutParams.TYPE_SYSTEM_ERROR;

Upvotes: -1

reidisaki
reidisaki

Reputation: 1524

Using the RemoteControlClient is what you need to implement.

enter image description here

Upvotes: 1

meredrica
meredrica

Reputation: 2563

This only works for music players, you cannot run everything there. Just create a lockscreen Widget and let the user decide.

Upvotes: 1

Related Questions