DropDataContentProvider


class DropDataContentProvider : ContentProvider


WebView provides partial support for Android Drag and Drop allowing images, text and links to be dragged out of a WebView.

The content provider is required to make the images drag work, to enable, you should add this class to your manifest, for example:

 <provider
            android:authorities="<your-package>.DropDataProvider"
            android:name="androidx.webkit.DropDataContentProvider"
            android:exported="false"
            android:grantUriPermissions="true"/>

Summary

Public constructors

Public functions

Bundle?
call(method: String, arg: String?, extras: Bundle?)
Int
delete(uri: Uri, selection: String?, selectionArgs: Array<String!>?)
String?
getType(uri: Uri)
Uri?
insert(uri: Uri, contentValues: ContentValues?)
Boolean
ParcelFileDescriptor?
openFile(uri: Uri, mode: String)
Cursor?
query(
    uri: Uri,
    projection: Array<String!>?,
    selection: String?,
    selectionArgs: Array<String!>?,
    sortOrder: String?
)
Int
update(
    uri: Uri,
    contentValues: ContentValues?,
    s: String?,
    strings: Array<String!>?
)

Inherited Constants

From android.content.ComponentCallbacks2
const Int
const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

Inherited functions

From android.content.ContentProvider
Array<ContentProviderResult!>!
applyBatch(
    authority: String!,
    operations: ArrayList<ContentProviderOperation!>!
)
Unit
attachInfo(context: Context!, info: ProviderInfo!)
Int
bulkInsert(uri: Uri!, values: Array<ContentValues!>!)
Bundle!
call(authority: String!, method: String!, arg: String!, extras: Bundle!)
Uri!
ContentProvider.CallingIdentity!
Unit
dump(fd: FileDescriptor!, writer: PrintWriter!, args: Array<String!>!)
AttributionSource!
String!
String!
String!
Context!
Array<PathPermission!>!
String!
Array<String!>!
getStreamTypes(uri: Uri!, mimeTypeFilter: String!)
String!
String!
Boolean
Unit
Unit
Unit

This function is deprecated.

Unit
onTrimMemory(level: Int)
AssetFileDescriptor!
openAssetFile(uri: Uri!, mode: String!)
ParcelFileDescriptor!
openFileHelper(uri: Uri!, mode: String!)
ParcelFileDescriptor!
<T> openPipeHelper(
    uri: Uri!,
    mimeType: String!,
    opts: Bundle!,
    args: T!,
    func: ContentProvider.PipeDataWriter<T!>!
)
AssetFileDescriptor!
openTypedAssetFile(uri: Uri!, mimeTypeFilter: String!, opts: Bundle!)
Boolean
refresh(uri: Uri!, extras: Bundle!, cancellationSignal: CancellationSignal!)
Context!
Unit
Unit
Unit
setReadPermission(permission: String!)
Unit
setWritePermission(permission: String!)
Unit
Uri!

Public constructors

DropDataContentProvider

Added in 1.7.0
DropDataContentProvider()

Public functions

call

fun call(method: String, arg: String?, extras: Bundle?): Bundle?

delete

Added in 1.7.0
fun delete(uri: Uri, selection: String?, selectionArgs: Array<String!>?): Int

getType

Added in 1.7.0
fun getType(uri: Uri): String?

insert

Added in 1.7.0
fun insert(uri: Uri, contentValues: ContentValues?): Uri?

onCreate

Added in 1.7.0
fun onCreate(): Boolean

openFile

fun openFile(uri: Uri, mode: String): ParcelFileDescriptor?

query

Added in 1.7.0
fun query(
    uri: Uri,
    projection: Array<String!>?,
    selection: String?,
    selectionArgs: Array<String!>?,
    sortOrder: String?
): Cursor?

update

Added in 1.7.0
fun update(
    uri: Uri,
    contentValues: ContentValues?,
    s: String?,
    strings: Array<String!>?
): Int