I have created an app that becomes one of the options whenever we are trying to make an outgoing call. (e.g. "Complete action using" (a) dialer (b) skype (c) myApp) I have inserted the CALL_PRIVILEGED intent-filter in order to do that.
Here is my AndroidManifest.xml File
<activity android:name=".OutgoingCallActivity">
<intent-filter android:priority="999">
<action android:name="android.intent.action.CALL_PRIVILEGED" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="tel"/>
</intent-filter>
</activity>
开发者_StackOverflow中文版Here is my OutgoingCallActivity.java
...
Intent mIntent = new Intent(android.content.Intent.ACTION_CALL, Uri.parse("tel:" + phoneNumber) );
startActivity(mIntent);
...
However, I would like to be able to capture the number of the contact that I have chosen and send it to the activity that I have created.
String phoneNumber = (get the phone number of the contact that I have selected)
How is this possible?
Check the Intent that you receive when starting the OutgoingCallActivity in the debugger, it has to be in there somewhere.
精彩评论