AndroidContentProvider class abstract
A communication interface with native Android ContentProvider https://developer.android.com/reference/android/content/ContentProvider
The native class is AndroidContentProvider
.
Generally, this class should be used with extends
and NOT implements
,
because it will remove a binding to the platofrm with a method channel.
However, implements
could be used for:
- using this class just as interface, or
- for creating a custom native implementation by extending from
AndroidContentProvider
The majority of the methods are called by the native platform to Dart. They can be overridden to implement some behavior.
But also, vice versa, some methods that are marked with native annotation are meant to be called from Dart to native. These methods will never be called from native to Dart.
Constructors
- AndroidContentProvider(String authority)
- Creates a communication interface with native Android ContentProvider.
Properties
-
ContentProvider's authority, matching the one, declared in
AndroidManifest.xml
.final - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
bulkInsert(
String uri, List< ContentValues> values) → Future<int> - bulkInsert(uri: Uri, values: Array<ContentValues!>): Int https://developer.android.com/reference/kotlin/android/content/ContentProvider#bulkinsert
-
call(
String method, String? arg, BundleMap? extras) → Future< BundleMap?> - call(method: String, arg: String?, extras: Bundle?): Bundle? https://developer.android.com/reference/kotlin/android/content/ContentProvider#call_1
-
callWithAuthority(
String authority, String method, String? arg, BundleMap? extras) → Future< BundleMap?> - call(authority: String, method: String, arg: String?, extras: Bundle?): Bundle? https://developer.android.com/reference/kotlin/android/content/ContentProvider#call
-
canonicalize(
String url) → Future< String?> - canonicalize(url: Uri): Uri? https://developer.android.com/reference/kotlin/android/content/ContentProvider#call(kotlin.String,%20kotlin.String,%20kotlin.String,%20android.os.Bundle)
-
clearCallingIdentity(
) → Future< CallingIdentity?> - Reset the identity of the incoming IPC on the current thread.
-
delete(
String uri, String? selection, List< String> ? selectionArgs) → Future<int> - delete(uri: Uri, selection: String?, selectionArgs: Array<String!>?): Int https://developer.android.com/reference/kotlin/android/content/ContentProvider#delete
-
deleteWithExtras(
String uri, BundleMap? extras) → Future< int> - delete(uri: Uri, extras: Bundle?): Int https://developer.android.com/reference/kotlin/android/content/ContentProvider#delete_1
-
getCallingAttributionTag(
) → Future< String?> -
Supported starting from Android Q, returns
null
on lower versions. -
getCallingPackage(
) → Future< String?> - getCallingPackage(): String? https://developer.android.com/reference/kotlin/android/content/ContentProvider#getcallingpackage
-
getCallingPackageUnchecked(
) → Future< String?> - getCallingPackageUnchecked(): String? https://developer.android.com/reference/kotlin/android/content/ContentProvider#getcallingpackageunchecked
-
getStreamTypes(
String uri, String mimeTypeFilter) → Future< List< String> ?> - getStreamTypes(uri: Uri, mimeTypeFilter: String): Array<String!>? https://developer.android.com/reference/kotlin/android/content/ContentProvider#getstreamtypes
-
getType(
String uri) → Future< String?> - getType(uri: Uri): String? https://developer.android.com/reference/kotlin/android/content/ContentProvider#gettype
-
insert(
String uri, ContentValues? values) → Future< String?> - insert(uri: Uri, values: ContentValues?): Uri? https://developer.android.com/reference/kotlin/android/content/ContentProvider#insert
-
insertWithExtras(
String uri, ContentValues? values, BundleMap? extras) → Future< String?> - insert(uri: Uri, values: ContentValues?, extras: Bundle?): Uri? https://developer.android.com/reference/kotlin/android/content/ContentProvider#insert_1
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onCallingPackageChanged(
) → Future< void> - onCallingPackageChanged(): Unit https://developer.android.com/reference/kotlin/android/content/ContentProvider#oncallingpackagechanged
-
onLowMemory(
) → void - onLowMemory(): Unit https://developer.android.com/reference/kotlin/android/content/ContentProvider#onlowmemory
-
onTrimMemory(
int level) → void - onTrimMemory(level: Int): Unit https://developer.android.com/reference/kotlin/android/content/ContentProvider#onlowmemory
-
openFile(
String uri, String mode) → Future< String?> - openFile(uri: Uri, mode: String): ParcelFileDescriptor? https://developer.android.com/reference/kotlin/android/content/ContentProvider#openfile
-
openFileWithSignal(
String uri, String mode, ReceivedCancellationSignal? cancellationSignal) → Future< String?> - openFile(uri: Uri, mode: String, signal: CancellationSignal?): ParcelFileDescriptor? https://developer.android.com/reference/kotlin/android/content/ContentProvider#openfile_1
-
query(
String uri, List< String> ? projection, String? selection, List<String> ? selectionArgs, String? sortOrder) → Future<CursorData?> - query(uri: Uri, projection: Array<String!>?, selection: String?, selectionArgs: Array<String!>?, sortOrder: String?): Cursor? https://developer.android.com/reference/kotlin/android/content/ContentProvider#query
-
queryWithExtras(
String uri, List< String> ? projection, BundleMap? queryArgs, ReceivedCancellationSignal? cancellationSignal) → Future<CursorData?> - query(uri: Uri, projection: Array<String!>?, queryArgs: Bundle?, cancellationSignal: CancellationSignal?): Cursor? https://developer.android.com/reference/kotlin/android/content/ContentProvider#query_2
-
queryWithSignal(
String uri, List< String> ? projection, String? selection, List<String> ? selectionArgs, String? sortOrder, ReceivedCancellationSignal? cancellationSignal) → Future<CursorData?> - query(uri: Uri, projection: Array<String!>?, selection: String?, selectionArgs: Array<String!>?, sortOrder: String?, cancellationSignal: CancellationSignal?): Cursor? https://developer.android.com/reference/kotlin/android/content/ContentProvider#query_1
-
refresh(
String uri, BundleMap? extras, ReceivedCancellationSignal? cancellationSignal) → Future< bool> - refresh(uri: Uri!, extras: Bundle?, cancellationSignal: CancellationSignal?): Boolean https://developer.android.com/reference/kotlin/android/content/ContentProvider#refresh
-
restoreCallingIdentity(
CallingIdentity identity) → Future< void> - restoreCallingIdentity(identity: ContentProvider.CallingIdentity): Unit https://developer.android.com/reference/kotlin/android/content/ContentProvider#restorecallingidentity
-
toString(
) → String -
A string representation of this object.
override
-
uncanonicalize(
String url) → Future< String?> - uncanonicalize(url: Uri): Uri? https://developer.android.com/reference/kotlin/android/content/ContentProvider#uncanonicalize
-
update(
String uri, ContentValues? values, String? selection, List< String> ? selectionArgs) → Future<int> - update(uri: Uri, values: ContentValues?, selection: String?, selectionArgs: Array<String!>?): Int https://developer.android.com/reference/kotlin/android/content/ContentProvider#update
-
updateWithExtras(
String uri, ContentValues? values, BundleMap? extras) → Future< int> - update(uri: Uri, values: ContentValues?, extras: Bundle?): Int https://developer.android.com/reference/kotlin/android/content/ContentProvider#update_1
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- TRIM_MEMORY_BACKGROUND → const int
- https://developer.android.com/reference/kotlin/android/content/ComponentCallbacks2#trim_memory_background
- TRIM_MEMORY_COMPLETE → const int
- https://developer.android.com/reference/kotlin/android/content/ComponentCallbacks2#trim_memory_complete
- TRIM_MEMORY_MODERATE → const int
- https://developer.android.com/reference/kotlin/android/content/ComponentCallbacks2#trim_memory_moderate
- TRIM_MEMORY_RUNNING_CRITICAL → const int
- https://developer.android.com/reference/kotlin/android/content/ComponentCallbacks2#trim_memory_running_critical
- TRIM_MEMORY_RUNNING_LOW → const int
- https://developer.android.com/reference/kotlin/android/content/ComponentCallbacks2#trim_memory_running_low
- TRIM_MEMORY_RUNNING_MODERATE → const int
- https://developer.android.com/reference/kotlin/android/content/ComponentCallbacks2#trim_memory_running_moderate
- TRIM_MEMORY_UI_HIDDEN → const int
- https://developer.android.com/reference/kotlin/android/content/ComponentCallbacks2#trim_memory_ui_hidden