android_content_provider
0.5.2, released 2 years ago by an unverified publisher
Flutter plugin to use ContentProvider and ContentResolver APIs on Android.
What it does
This plugin exposes Android ContentProvider and related ContentResolver APIs to Flutter. It allows developers to both consume existing content providers from other apps and create their own custom content providers in Flutter and native code.
AI-written summary of version 0.5.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to access data exposed by other Android applications via ContentResolver.
- You need to build a custom ContentProvider in a Flutter app for other Android apps to consume.
Skip it when
- You are targeting iOS or other non-Android platforms.
- You just need a standard local key-value or SQLite database without Android-specific content provider sharing.
Strengths
- Provides full support for Android ContentProvider and ContentResolver APIs.
- Allows creating custom Android ContentProviders with Dart business logic.
Weaknesses
- Android-only platform support.
- Requires manual configuration in native Android code (Java/Kotlin) and AndroidManifest.xml.
Setup
- Kind
- Plugin (native code)
- Effort
- High
- Code generation
- No
- Direct dependencies
- 2
Requires configuring package visibility in AndroidManifest.xml, subclassing AndroidContentProvider in native Kotlin or Java code, and setting up Dart entrypoints.
class MyAndroidContentProvider extends AndroidContentProvider {
MyAndroidContentProvider(String authority) : super(authority);
@override
Future<int> delete(
String uri,
String? selection,
List<String>? selectionArgs,
) async {
return 0;
}
}Alternatives
Packages that do the same job and could replace android_content_provider.
- content_resolver
Plugin to read and write Android content URIs.
49Compare
Works with
Packages commonly used together with android_content_provider: ones it builds on, ones built on it, and its own family.