I have an Android app written in Scala. When I launch it the following error message appears in the log window:
08-31 13:11:10.781 5398-5398/my.app.app123
This code helped me to clear the problem
List resInfoList = this.getPackageManager().queryIntentActivities(yourIntent, PackageManager.MATCH_DEFAULT_ONLY);
for (ResolveInfo resolveInfo : resInfoList) {
String packageName = resolveInfo.activityInfo.packageName;
this.grantUriPermission(packageName, yourURI, Intent.FLAG_GRANT_WRITE_URI_PERMISSION | Intent.FLAG_GRANT_READ_URI_PERMISSION);
}
As told by sakiM
, its a hardware problem with CPU in some phones. Adding to his list of phone brands, Micromax
too has this problem. Thank you sakiM
for pointing out the Irrelevant Scala Problem
.
Note: If you are using fragment, you can replace this
to getActivity()
in the above given code.