diff --git a/docs/html/guide/components/intents-common.jd b/docs/html/guide/components/intents-common.jd index 91d57c4bb2b7c..621222bec6f6d 100644 --- a/docs/html/guide/components/intents-common.jd +++ b/docs/html/guide/components/intents-common.jd @@ -66,6 +66,11 @@ page.tags="IntentFilter"
To create a new note, use the + +{@code ACTION_CREATE_NOTE} action and specify note details such as the subject and text using extras defined below.
+ +Note: Apps must ask for confirmation from the user +before completing the action.
+ +Example intent:
+
+public void createNote(String subject, String text) {
+ Intent intent = new Intent(NoteIntents.ACTION_CREATE_NOTE)
+ .putExtra(NoteIntents.EXTRA_NAME, subject)
+ .putExtra(NoteIntents.EXTRA_TEXT, text);
+ if (intent.resolveActivity(getPackageManager()) != null) {
+ startActivity(intent);
+ }
+}
+
+
+Example intent filter:
++<activity ...> + <intent-filter> + <action android:name="com.google.android.gms.actions.CREATE_NOTE" /> + <category android:name="android.intent.category.DEFAULT" /> + <data android:mimeType=”*/*”> + </intent-filter> +</activity> ++ + + + +