From 86bbfaabdd7c3ed9b90c633d9c8022077f102767 Mon Sep 17 00:00:00 2001 From: Hemal Patel Date: Wed, 3 Aug 2016 15:57:19 -0700 Subject: [PATCH] Docs: Renamed Google Now to Google Voice Actions This commit contains the following changes: - Renamed instances of Google Now to Google Voice Actions - Removed the Intents fired by Google Now section as it is obselete - Added link to the Google Voice Actions page - Changed the voice-icon.png's reference link to the System Actions reference section on the Google Voice Actions page - Revised the HTML comment and local CSS by replacing Google Now box with Google Voice Actions box. Bug: 19501778 Change-Id: I3e4364aaceaff4f5bceb090dd4f8da548dfa5c30 --- docs/html/guide/components/intents-common.jd | 488 ++++++++++++--------------- 1 file changed, 220 insertions(+), 268 deletions(-) diff --git a/docs/html/guide/components/intents-common.jd b/docs/html/guide/components/intents-common.jd index 9488f6ecb982..e6c9fc691cbb 100644 --- a/docs/html/guide/components/intents-common.jd +++ b/docs/html/guide/components/intents-common.jd @@ -99,7 +99,6 @@ page.tags="IntentFilter"
  • Verify Intents with the Android Debug Bridge
  • -
  • Intents Fired by Google Now
  • See also

    @@ -110,9 +109,9 @@ Filters - + -

    An intent allows you to start an activity in another app by describing a simple -action you'd like to perform (such as "view a map" or "take a picture") -in an {@link android.content.Intent} object. This type of intent is -called an implicit intent because it does not specify the app component -to start, but instead specifies an action and provides some -data with which to perform the action.

    - -

    When you call -{@link android.content.Context#startActivity startActivity()} or -{@link android.app.Activity#startActivityForResult startActivityForResult()} and pass it an -implicit intent, the system resolves the intent to an app that can handle the intent -and starts its corresponding {@link android.app.Activity}. If there's more than one app -that can handle the intent, the system presents the user with a dialog to pick which app -to use.

    - -

    This page describes several implicit intents that you can use to perform common actions, -organized by the type of app that handles the intent. Each section also shows how you can -create an intent filter to -advertise your app's ability to perform the same action.

    - -

    Caution: If there are no apps on the device that can receive -the implicit intent, your app will crash when it calls {@link android.content.Context#startActivity -startActivity()}. To first verify that an app exists to receive the intent, call {@link -android.content.Intent#resolveActivity resolveActivity()} on your {@link android.content.Intent} -object. If the result is non-null, there is at least one app that can handle the intent and -it's safe to call {@link android.content.Context#startActivity startActivity()}. If the result is -null, you should not use the intent and, if possible, you should disable the feature that invokes -the intent.

    - -

    If you're not familiar with how to create intents or intent filters, you should first read -Intents and Intent Filters.

    - -

    To learn how to fire the intents listed on this page from your development host, see -Verify Intents with the Android Debug Bridge.

    +

    + An intent allows you to start an activity in another app by describing a + simple action you'd like to perform (such as "view a map" or "take a + picture") in an {@link android.content.Intent} object. This type of intent + is called an implicit intent because it does not specify the app + component to start, but instead specifies an action and provides + some data with which to perform the action. +

    -

    Google Now

    +

    + When you call {@link android.content.Context#startActivity startActivity()} + or {@link android.app.Activity#startActivityForResult + startActivityForResult()} and pass it an implicit intent, the system + resolves + the intent to an app that can handle the intent and starts its + corresponding {@link android.app.Activity}. If there's more than one app + that can handle the intent, the system presents the user with a dialog to + pick which app to use. +

    -

    Google Now fires some of the intents listed -on this page in response to voice commands. For more information, see -Intents Fired by Google Now.

    +

    + This page describes several implicit intents that you can use to perform + common actions, organized by the type of app that handles the intent. Each + section also shows how you can create an intent + filter to advertise your app's ability to perform the same action. +

    +

    + Caution: If there are no apps on the device that can + receive the implicit intent, your app will crash when it calls {@link + android.content.Context#startActivity startActivity()}. To first verify that + an app exists to receive the intent, call {@link + android.content.Intent#resolveActivity resolveActivity()} on your {@link + android.content.Intent} object. If the result is non-null, there is at least + one app that can handle the intent and it's safe to call {@link + android.content.Context#startActivity startActivity()}. If the result is + null, you should not use the intent and, if possible, you should disable the + feature that invokes the intent. +

    +

    + If you're not familiar with how to create intents or intent filters, you + should first read Intents and Intent + Filters. +

    +

    + To learn how to fire the intents listed on this page from your development + host, see Verify Intents with the Android Debug + Bridge. +

    +

    Google Voice Actions

    +

    + Google Voice + Actions fires some of the intents listed on this page in response to + voice commands. For more information, see + Intents fired by Google Voice Actions. +

    Alarm Clock

    -

    Create an alarm

    - -
    -
    - - - + +
    +
    + +
    -

    Google Now

    + +

    + Google Voice Actions +

    +
      -
    • "set an alarm for 7 am"
    • +
    • "set an alarm for 7 am" +
    @@ -301,22 +321,30 @@ android.provider.AlarmClock#ACTION_SET_ALARM} intent, your app must have the

    Create a timer

    - -
    -
    - - - + +
    +
    + +
    -

    Google Now

    + +

    + Google Voice Actions +

    +
      -
    • "set timer for 5 minutes"
    • +
    • "set timer for 5 minutes" +
    -

    To create a countdown timer, use the {@link android.provider.AlarmClock#ACTION_SET_TIMER} -action and specify timer details such as the duration using extras defined below.

    +

    + To create a countdown timer, use the {@link + android.provider.AlarmClock#ACTION_SET_TIMER} action and specify timer + details such as the duration using extras defined below. +

    Note: This intent was added in Android 4.4 (API level 19).

    @@ -594,28 +622,36 @@ how to create an appropriate {@link android.net.Uri} for the output location, re </activity> -

    When handling this intent, your activity should check for the {@link -android.provider.MediaStore#EXTRA_OUTPUT} extra in the incoming {@link android.content.Intent}, -then save the captured image or video at the location specified by that extra and call {@link -android.app.Activity#setResult(int,Intent) setResult()} with an -{@link android.content.Intent} that includes a compressed thumbnail -in an extra named "data".

    +

    + When handling this intent, your activity should check for the {@link + android.provider.MediaStore#EXTRA_OUTPUT} extra in the incoming {@link + android.content.Intent}, then save the captured image or video at the + location specified by that extra and call {@link + android.app.Activity#setResult(int,Intent) setResult()} with an {@link + android.content.Intent} that includes a compressed thumbnail in an extra + named "data". +

    Start a camera app in still image mode

    - -
    -
    - - - + +
    +
    + +
    -

    Google Now

    + +

    + Google Voice Actions +

    +
      -
    • "take a picture"
    • +
    • "take a picture" +
    @@ -661,17 +697,22 @@ public void capturePhoto() {

    Start a camera app in video mode

    - -
    -
    - - - + +
    +
    + +
    -

    Google Now

    + +

    + Google Voice Actions +

    +
      -
    • "record a video"
    • +
    • "record a video" +
    @@ -1348,20 +1389,30 @@ Framework guide.

    Call a car

    - -
    -
    - - - + +
    +
    + +
    -

    Google Now

    + +

    + Google Voice Actions +

    +
      -
    • "get me a taxi"
    • -
    • "call me a car"
    • +
    • "get me a taxi" +
    • + +
    • "call me a car" +
    -

    (Android Wear only)

    + +

    + (Android Wear only) +

    To call a taxi, use the @@ -1548,17 +1599,22 @@ public void playMedia(Uri file) {

    Play music based on a search query

    - -
    -
    - - - + +
    +
    + +
    -

    Google Now

    + +

    + Google Voice Actions +

    +
      -
    • "play michael jackson billie jean"
    • +
    • "play michael jackson billie jean" +
    @@ -1861,19 +1917,28 @@ android.content.Intent#ACTION_DIAL} action and specify a phone number using the URI scheme defined below. When the phone app opens, it displays the phone number but the user must press the Call button to begin the phone call.

    - -
    -
    - - - + +
    +
    + +
    -

    Google Now

    + +

    + Google Voice Actions +

    +
      -
    • "call 555-5555"
    • -
    • "call bob"
    • -
    • "call voicemail"
    • +
    • "call 555-5555" +
    • + +
    • "call bob" +
    • + +
    • "call voicemail" +
    @@ -1947,16 +2012,22 @@ public void dialPhoneNumber(String phoneNumber) {

    Search using a specific app

    - -
    -
    - - + +
    +
    + +
    -

    Google Now

    + +

    + Google Voice Actions +

    +
      -
    • "search for cat videos on myvideoapp"
    • +
    • "search for cat videos on myvideoapp" +
    @@ -1976,7 +2047,7 @@ the SEARCH_ACTION action, as shown in the example intent filter bel
    "com.google.android.gms.actions.SEARCH_ACTION"
    -
    Support search queries from Google Now.
    +
    Support search queries from Google Voice Actions.
    @@ -2207,17 +2278,22 @@ at {@link android.provider.Telephony}.

    Load a web URL

    - -
    -
    - - - + +
    +
    + +
    -

    Google Now

    + +

    + Google Voice Actions +

    +
      -
    • "open example.com"
    • +
    • "open example.com" +
    @@ -2307,128 +2383,4 @@ adb shell am start -a android.intent.action.DIAL \

    For more information, see -ADB Shell Commands.

    - - - - - - -

    Intents Fired by Google Now

    - -

    Google Now recognizes many voice commands -and fires intents for them. As such, users may launch your app with a Google Now voice command -if your app declares the corresponding intent filter. For example, if your app can -set an alarm and you add the corresponding intent filter to your -manifest file, Google Now lets users choose your app when they request to set an alarm, as -shown in figure 1.

    - - -

    Figure 1. Google Now lets users choose from installed -apps that support a given action.

    - -

    Google Now recognizes voice commands for the actions listed in table 1. For more information -about declaring each intent filter, click on the action description.

    - -

    Table 1. Voice commands recognized by Google Now -(Google Search app v3.6).

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    CategoryDetails and ExamplesAction Name
    Alarm -

    Set alarm

    -
      -
    • "set an alarm for 7 am"
    • -
    -
    {@link android.provider.AlarmClock#ACTION_SET_ALARM AlarmClock.ACTION_SET_ALARM}
    -

    Set timer

    -
      -
    • "set a timer for 5 minutes"
    • -
    -
    {@link android.provider.AlarmClock#ACTION_SET_TIMER AlarmClock.ACTION_SET_TIMER}
    Communication -

    Call a number

    -
      -
    • "call 555-5555"
    • -
    • "call bob"
    • -
    • "call voicemail"
    • -
    -
    {@link android.content.Intent#ACTION_CALL Intent.ACTION_CALL}
    Local -

    Book a car

    -
      -
    • "call me a car"
    • -
    • "book me a taxi"
    • -
    -
    - ReserveIntents
    .ACTION_RESERVE_TAXI_RESERVATION
    Media -

    Play music from search

    -
      -
    • "play michael jackson billie jean"
    • -
    -
    {@link android.provider.MediaStore#INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH MediaStore
    .INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH}
    -

    Take a picture

    -
      -
    • "take a picture"
    • -
    -
    {@link android.provider.MediaStore#INTENT_ACTION_STILL_IMAGE_CAMERA MediaStore
    .INTENT_ACTION_STILL_IMAGE_CAMERA}
    -

    Record a video

    -
      -
    • "record a video"
    • -
    -
    {@link android.provider.MediaStore#INTENT_ACTION_VIDEO_CAMERA MediaStore
    .INTENT_ACTION_VIDEO_CAMERA}
    Search -

    Search using a specific app

    -
      -
    • "search for cat videos
      on myvideoapp"
    • -
    -
    "com.google.android.gms.actions
    .SEARCH_ACTION"
    Web browser -

    Open URL

    -
      -
    • "open example.com"
    • -
    -
    {@link android.content.Intent#ACTION_VIEW Intent.ACTION_VIEW}
    +ADB Shell Commands.

    \ No newline at end of file -- 2.11.0