Why Dismiss keyguard is not working in Samsung Galaxy tab?

701 views Asked by At

I have one application which will notify users when any alarm raised on the server, so when alarm comes App will play the beep sound and open the activity, even the device is in sleep mode , it wakes up dismiss the keyguard and display activity with beep sound. this feature working fine in other tabs but in samsung galaxy tab it doesn't dismiss the keyguard.Beep sound come propelry and when you manually release the keyguard of device you can be able to see the activity which has to be displayed when alarms generates.

I am using below code to dismiss the keyguard in activity's onCreate method :

getWindow().addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);

Not sure why this code is not working in Samsung Galaxy tab.Can anybody provide me some clue about it? Regards, Piks

0

There are 0 answers