Gboard Keyboard Gif Sticker Integration
Solution 1:
You need to implement the scheme:
The content:// scheme is explained in IETF "BCP35", which directs you to see IANA "Uniform Resource Identifier (URI) Schemes", where it is explained:
URI Scheme | Template | Description | Status | Reference | Notes
content | prov/content | content | Provisional | Dave_Thaler | -
The link directs you to this information:
"(last updated 2012-09-23)
Resource Identifier (RI) Scheme name: content Status: provisional
Scheme syntax: content://provider/
Scheme semantics: Accessing an Android content provider.
Encoding considerations: Unknown, use with care.
Applications/protocols that use this scheme name: Performs a query on an Android Content Provider
Interoperability considerations: Unknown, use with care. May be unsuitable for open use on the public internet.
Security considerations: Unknown, use with care.
Contact: Registering party: Dave Thaler Scheme creator: Open Handset Alliance
Author/Change controller: Either the registering party or someone who is verified to represent the scheme creator. See previous answer.
References: http://en.wikipedia.org/wiki/Open_Handset_Alliance, http://developer.android.com/guide/topics/providers/content-providers.html
(file created 2012-09-23)".
Refer to the last URL "Android Developers > Docs > Guides > Content providers" for more information:
"Content providers can help an application manage access to data stored by itself, stored by other apps, and provide a way to share data with other apps. They encapsulate the data, and provide mechanisms for defining data security. Content providers are the standard interface that connects data in one process with code running in another process. Implementing a content provider has many advantages. Most importantly you can configure a content provider to allow other applications to securely access and modify your app data ...
...
A number of other classes rely on the ContentProvider class:
If you are making use of any of these classes you also need to implement a content provider in your application. Note that when working with the sync adapter framework you can also create a stub content provider as an alternative. For more information about this topic, see Creating a stub content provider.
From: Creating a stub content provider:
...
Add a stub content provider
To create a stub content provider for your app, extend the class ContentProvider and stub out its required methods. The following snippet shows you how to create the stub provider:
In Kotlin:
/*
* Define an implementation of ContentProvider that stubs out
* all methods
*/classStubProvider : ContentProvider() {
/*
* Always return true, indicating that the
* provider loaded correctly.
*/overridefunonCreate(): Boolean = true/*
* Return no type for MIME type
*/overridefungetType(uri: Uri): String? = null/*
* query() always returns no results
*
*/overridefunquery(
uri: Uri,
projection: Array<String>,
selection: String,
selectionArgs: Array<String>,
sortOrder: String
): Cursor? = null/*
* insert() always returns null (no URI)
*/overridefuninsert(uri: Uri, values: ContentValues): Uri? = null/*
* delete() always returns "no rows affected" (0)
*/overridefundelete(uri: Uri, selection: String, selectionArgs: Array<String>): Int = 0/*
* update() always returns "no rows affected" (0)
*/overridefunupdate(
uri: Uri,
values: ContentValues,
selection: String,
selectionArgs: Array<String>
): Int = 0
}
...
Declare the provider in the manifest
The sync adapter framework verifies that your app has a content provider by checking that your app has declared a provider in its app manifest. To declare the stub provider in the manifest, add a <provider> element with the following attributes:
...
<manifestxmlns:android="http://schemas.android.com/apk/res/android"package="com.example.android.network.sync.BasicSyncAdapter"android:versionCode="1"android:versionName="1.0" ><applicationandroid:allowBackup="true"android:icon="@drawable/ic_launcher"android:label="@string/app_name"android:theme="@style/AppTheme" >
...
<providerandroid:name="com.example.android.datasync.provider.StubProvider"android:authorities="com.example.android.datasync.provider"android:exported="false"android:syncable="true"/>
...
</application></manifest>
Please refer to the above URLs for complete documentation and further links not included in this short answer.
Post a Comment for "Gboard Keyboard Gif Sticker Integration"