Hi!
I actually have an app doing the exact same thing and it is working.
My approach is to have a service running which uses the
PhoneStateListener. In the onCallStateChanged() method I have the
following source code:
case TelephonyManager.CALL_STATE_RINGING:
try {
Thread.Sleep(4000); // Wait for the inCallScreen to appear ...
might be a better way than just sleep()
kmkl.disableKeyguard(); // Disable keyguard, had to do this to
get it working but not sure why
} catch (Exception e) { Log.d("kCaller", "Exception " + e); }
startActivity(act); // Start the activity as stated in the Intent
act
break;
With the following defined outside the PhoneStateListener (to conserve
CPU)
KeyguardManager km = (KeyguardManager)
getSystemService(Context.KEYGUARD_SERVICE);
final KeyguardManager.KeyguardLock kmkl =
km.newKeyguardLock("kCaller");
My activity launched by Intent act and is using a custom theme
including
<item name="android:windowIsFloating">true</item>
in order to disable fullscreen mode.
This works for me on both the 2.0 emulator and the 1.5 emulator,
hopefully it will solve your problem!
Kind regards,
Erik
On Apr 11, 7:01 am, sleith <[email protected]> wrote:
> Hi, i use the PhoneStateListener to listen for the call.
> When i receive ringing state, i tried to launch an intent to run my
> app.
> but i noticed that my app is go behind the InCallScreen.
> I've tried using delay time to make the InCallScreen pop up first,
> then launched my app, but still cannot replace on top of the
> InCallScreen layer. I have to hang up the call in order to see my app.
> Could someone help me?
> Thanks >.<
--
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
To unsubscribe, reply using "remove me" as the subject.