Failed To Find Content Provider In Api 30
UPDATE: I have to completely change my question since I found more details related to my problem. The problem: My app that resolves Content Provider doesn't work in Emulator with A
Solution 1:
The reason my custom ContentProvider doesn't work on Emulator with API 30 is Package visibility in Android 11+
To Fix my issue I've added following <queries>
element into client's AndroidManifest.xml:
<manifest>
...
<queries><packageandroid:name="com.a52.datafeeder01" /></queries>
...
</manifest>
where com.a52.datafeeder01
is the package name where custom ContentProvider is defined.
Solution 2:
In case of my problem, simply add:
<manifest>
...
<queries><providerandroid:authorities="com.example.appcontainprovider" /></queries>
...
</manifest>
where authorities
value is provider authorities.
Reference: https://developer.android.com/training/basics/intents/package-visibility#provider-authority
Solution 3:
Please add the following permission in manifest
<uses-permissionandroid:name="android.permission.QUERY_ALL_PACKAGES"tools:ignore="QueryAllPackagesPermission">
This resolved my problem in android 11
Post a Comment for "Failed To Find Content Provider In Api 30"