android native call only, no third party voip call

List<ResolveInfo> availableSoft = (List<ResolveInfo>) 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)