The building Lord has developed a small app, hang a run in the background, after a certain condition, dial telephone,
Permission has been opened, and a variety of restrictions also have no,
But still can't do like HW phone dial,
I looked at the Android Studio logs and mobile phone APP running record,
According to the background while running and dial the telephone, but did not play out call interface,
Unless it is stopped in the APP and don't lock screen interface, can automatically call (so that)
Dialling code is as follows:
Public static void callPhone (AppCompatActivity AppCompatActivity, String, number, int simId) {
Intent callIntent=new Intent (Intent. ACTION_CALL);
CallIntent. SetData (Uri. Parse (" tel: + number "));
for (int i=0; I & lt; DualSimTypes. Length; I++) {
CallIntent. PutExtra (dualSimTypes [I], simId);
}
AppCompatActivity. StartActivity (callIntent);
}