Android:Unlock Screen -


i able unlock screen when there incoming call , after lock screen again. after restart of device if first incoming call logic not working. on subsequent incoming calls logic works.

any help??

my code is:

string state = intent.getstringextra(telephonymanager.extra_state); if (state.contentequals("ringing")) {     lock.disablekeyguard(); }     lock.reenablekeyguard(); 

it seems me "lock" object not exist until first call made can't tell looking @ piece of code.

i use windowmanager unlock , lock screen.

window window = getwindow(); windowmanager.layoutparams windowparams = window.getattributes();     winparams.flags |= windowmanager.layoutparams.flag_show_when_locked;     window.setattributes(winparams);     

http://developer.android.com/reference/android/view/windowmanager.layoutparams.html

hope helps


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -