diff options
| author | 2019-04-16 21:13:44 +0000 | |
|---|---|---|
| committer | 2019-04-16 21:13:44 +0000 | |
| commit | 45683e40f1857ac1e42d5ac5e3399ab08ae70be8 (patch) | |
| tree | 91c94c08be65617d40e668f45a6e4bdad4be510c | |
| parent | abf224e88f5b1440d3fe37e7f9e633cb0a90d703 (diff) | |
| parent | 8b456581409e501a4153f91f2f1d2f561d7362ac (diff) | |
Merge "Added example for ContentCaptureService.SERVICE_META_DATA" into qt-dev
| -rw-r--r-- | core/java/android/service/contentcapture/ContentCaptureService.java | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/core/java/android/service/contentcapture/ContentCaptureService.java b/core/java/android/service/contentcapture/ContentCaptureService.java index d8614a9d66af..02ce87324a4f 100644 --- a/core/java/android/service/contentcapture/ContentCaptureService.java +++ b/core/java/android/service/contentcapture/ContentCaptureService.java @@ -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"; |