Merge "Added example for ContentCaptureService.SERVICE_META_DATA" into qt-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
45683e40f1
@@ -86,11 +86,28 @@ public abstract class ContentCaptureService extends Service {
|
||||
* <code><{@link
|
||||
* android.R.styleable#ContentCaptureService content-capture-service}></code> tag.
|
||||
*
|
||||
* <p>This is a a sample XML file configuring a ContentCaptureService:
|
||||
* <pre> <content-capture-service
|
||||
* android:settingsActivity="foo.bar.SettingsActivity"
|
||||
* . . .
|
||||
* /></pre>
|
||||
* <p>Here's an example of how to use it on {@code AndroidManifest.xml}:
|
||||
*
|
||||
* <pre>
|
||||
* <service android:name=".MyContentCaptureService"
|
||||
* android:permission="android.permission.BIND_CONTENT_CAPTURE_SERVICE">
|
||||
* <intent-filter>
|
||||
* <action android:name="android.service.contentcapture.ContentCaptureService" />
|
||||
* </intent-filter>
|
||||
*
|
||||
* <meta-data
|
||||
* android:name="android.content_capture"
|
||||
* android:resource="@xml/my_content_capture_service"/>
|
||||
* </service>
|
||||
* </pre>
|
||||
*
|
||||
* <p>And then on {@code res/xml/my_content_capture_service.xml}:
|
||||
*
|
||||
* <pre>
|
||||
* <content-capture-service xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
* android:settingsActivity="my.package.MySettingsActivity">
|
||||
* </content-capture-service>
|
||||
* </pre>
|
||||
*/
|
||||
public static final String SERVICE_META_DATA = "android.content_capture";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user