KeyGuard not working

Put your problem here if it does not fit any of the other categories.

KeyGuard not working

Postby rock_win » Tue Jan 22, 2008 7:59 pm

Hi

i'm trying to lock the keys of device after a particular event, like pressing of key 'a'== keycode=29

I'm able to get the guard, and also the lock.But it seems that the lock is not working.In API also nothing is mentioned about the TAG argument that needs to be passed to obtain the lock.

my code is:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. guard=(KeyguardManager)this.getSystemService("keyguard");
  3.  
  4. KeyguardLock lock=guard.newKeyguardLock("KeyG");
  5.  
  6. lock.reenableKeyguard();
  7.  
  8. //lock.disableKeyguard();
  9.  
  10. Log.i("Guard","State--"+guard.inKeyguardRestrictedInputMode());
  11.  
  12.  
Parsed in 0.032 seconds, using GeSHi 1.0.8.4


Everytime i get state as false.

I have tried arguments of TAG as -- Application name, Activity name, qualified class name where this code is written, dummy value "a". But none of them seem to work

Please help !
rock_win
Junior Developer
Junior Developer
 
Posts: 11
Joined: Mon Jan 21, 2008 4:24 pm

Top

Postby watersky » Wed Dec 09, 2009 7:15 am

Hi, rock_win.

I also have this problem, do you slove it now?

Wish you can share your solution with me.

Thank you very much:)
watersky
Freshman
Freshman
 
Posts: 6
Joined: Thu Oct 22, 2009 7:36 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: mobiforms and 13 guests