My application listens for incomming calls and puts additional
information about the caller to
the Incoming Call screen via transparent activity. I've got the
problems with displaying this
information while receiving the call when phone is in screen lock
state.

1. On HTC Dream when the call came in, first I saw the standard
incoming call screen and no lock,
then the lock screen appeared probably because application tries to
perform some actions (actually,
instantiate the transparent Activity).

2. On HTC Hero when the call came in the lock screen appears saying
"Drag down to unlock" and then
my transparent activity is displayed. After that there is no
possibility to unlock the screen as all
user interaction is intercepted by my activity, the only way is to
close it via pressing Back button.

What I need is to unlock the screen when notification about incomming
call is received and only after
display the transparent activity with some info. I tried to use
KeyguardManager for this purposes, here
is the code snippet:

...
KeyguardManager manager = (KeyguardManager) context.getSystemService
(Context.KEYGUARD_SERVICE);
KeyguardManager.KeyguardLock lock = manager.newKeyguardLock
(CallStateReceiver.class.getSimpleName());

lock.disableKeyguard();
...
context.startActivity(transparentActivityIntent);


This didn't help actually, in the DDMS I see the log that
disableKeyguard() was called but the keyguard
remains. What I'm doing wrong ? The description of disableKeyguard()
function says that "A good place
to call this is from onResume()" but I'm calling this from my
BroadcastReceiver's onReceive() method -
maybe that's the problem ?

Please advice or provide a codesnippet which worked for you.

Thanks in advance !
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to