kemmotar
kemmotar

Reputation: 199

Are there way start activity over lock screen?

I need start activity over lock screen. It can be small activity on lock screen or fully new lock screen. It must start with lock button click

How to do this? I already have activity, broadcast reciver and service to do all job, but don't know how to put activity over lock screen.

Upvotes: 1

Views: 2517

Answers (1)

A--C
A--C

Reputation: 36449

In your Activity's onCreate(), before calling setContentView(), add this:

getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED); 

For all the window flags you can set, refer to the documentation

Upvotes: 3

Related Questions