开发者

Context menu before sending SMS

开发者 https://www.devze.com 2022-12-19 04:34 出处:网络
if google voice is insta开发者_如何转开发lled on your phone, when you dial a phone number a context menu pops up asking if you want to dial with or without google voice. I would like to accomplish the

if google voice is insta开发者_如何转开发lled on your phone, when you dial a phone number a context menu pops up asking if you want to dial with or without google voice. I would like to accomplish the same task for dialing a number or sending a text message. Does the API allow you to do that?

It seems there is a process_outgoing_calls, in the permissions manifest, but is there anything for the SMS?


I haven't tested this myself, but you should be able to listen for the "sms-to" intent by adding this intent-filter to your manifest for a corresponding activity (from the system mms/sms app - http://bit.ly/9JjHGd):

        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <action android:name="android.intent.action.SENDTO" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:scheme="sms" />
            <data android:scheme="smsto" />
        </intent-filter>


I don't know if there is a way to intercept outgoing_sms. There is one for intercepting received ones.

You can reading smspopup src code to get some ideas.

0

精彩评论

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