android native call only, no third party voip call

阅读更多
List availableSoft = (List) context.getPackageManager().queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);
if (availableSoft.size() == 1) {
context.startActivity(intent);
} else {
for (ResolveInfo info : availableSoft) {
if ("com.android.phone".equals(info.activityInfo.packageName)) {
intent.setComponent(new ComponentName(info.activityInfo.packageName, info.activityInfo.name));
context.startActivity(intent);
}
}
}

你可能感兴趣的:(android native call only, no third party voip call)