开发者

Android Capture Call button

开发者 https://www.devze.com 2023-02-11 09:21 出处:网络
I am new to android ,how can I know if the call button is pressed or i can replace default dialer activity using my dialer I have used following code

I am new to android ,how can I know if the call button is pressed or i can replace default dialer activity using my dialer I have used following code

<receiver  android:name="CallService">
        <intent-filter>
          <action android:name="android.intent.action.CALL_BUTTON" />
        </intent-filter>
    </receiver>

and here is my broadcast

public void onReceive(Context context, 开发者_Python百科Intent intent)
{
    String mAction = intent.getAction();

    Log.e("Intent", mAction);
}

But its not receiving any intent

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号