According to this blogpost on the Android developers blog, it must be doable to change the outgoing call number:
http://android-developers.blogspot.com/2011/01/processing-ordered-broadcasts.html
The problem is that it does not work for me, my code is:
String action = intent.getAction();
if (Intent.ACTION_NEW_OUTGOING_CALL.equals(action)) {
String phonenumber = getResultData();
if (phonenumber == null) {
phonenumber = intent
.getStringExtra(Intent.EXTRA_PHONE_NUMBER);
}
String reformatedNumber = reformatNumber(phonenumber);
setResultData(reformatedNumber);
}
Despite the fact that I reformat the number dialed by the phone number called.
Any insight?
I have these permissions in my manifest:
<uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.CALL_PRIVILEGED" />
, , , , , , "" , . , - , .