This code is working until Android 10/Q. when this function is called it doesn't pop up anymore like it did in old version before Android 10.
public static void promptDefaultHandler(Context context) {
Intent intent = new Intent(Telephony.Sms.Intents.ACTION_CHANGE_DEFAULT);
intent.putExtra(Telephony.Sms.Intents.EXTRA_PACKAGE_NAME, context.getPackageName());
context.startActivity(intent);
}
There is an error in the logcat which is not clear to me what is wrong.
2020-09-05 14:53:35.227 1818-2685/? W/PermissionPolicyService: Action Removed: starting Intent { act=android.provider.Telephony.ACTION_CHANGE_DEFAULT cmp=com.google.android.permissioncontroller/com.android.packageinstaller.role.ui.RequestRoleActivity (has extras) } from free.text.sms (uid=10338)
Any tip how to fix this?