I have a feature in my app which directly calls a phone number without going through the android dallier,
Everything worked fine on android 2.2 and 2.3,
but now since i upgraded my phone to 4.1,
The call intent being “ACTION_CALL” and not “ACTION_DIAL”
still goes to the dialer screen and waits for the user to tap the call button
Following is the block of code which is responsible to directly call a phone number:
void makeCall(Context context,String number){
Intent callIntent = new Intent(Intent.ACTION_CALL);
// Add the additional flags required for staring new Activity.
callIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
callIntent.setData(Uri.parse("tel:"+number));
context.startActivity(callIntent);
}
I also have the call permissions set in the manifest
<uses-permission android:name="android.permission.CALL_PRIVILEGED" />
<uses-permission android:name="android.permission.CALL_PHONE" />
Has anyone else faced a similar issue?
It seems android treats “9999999991”, “9999999992”, “9999999993” since android 4.1 which i was using as dummy phone numbers for my testing, whereas the normal numbers dial up directly the above numbers are shown in the dialer.