App in front of slider when someone call
I need to implement app for HTC. App needs to do next, when someone call to appear in front of HTC slider with two buttons green and red phone ( accept an开发者_如何学运维d reject ). It is annoying when remove slider up to reject call, that is purpose of this app. Can someone tell me how to put this in fron of slider , any idea how to implement this in general ?
Yes this can be done in android. Implement a broadcast receiver with following intent-filter.
<intent-filter>
<action android:name="android.intent.action.PHONE_STATE" />
</intent-filter>
and in its onReceive method start your activity if :
if(paramIntent.getStringExtra("state").equals(TelephonyManager.EXTRA_STATE_RINGING)
精彩评论