I am trying to implement app actions in my android app.when I am testing my app App action test tool V2.0.0 its working fine but whenever i try to give voice command or type ("start running in my app") it doesn't work.I have my app on play console and trying with same developer account
Expected that the Running activity launch with the voice command of the intent
action.xml
<!-- This file describes the supported actions by this app -->
<action intentName="actions.intent.START_EXERCISE">
<!-- Each action requires at least one fulfillment that defines how the app will handle this action -->
<!-- Define the urlTemplate in the format you define your deeplinks in AndroidManifest.xml -->
<fulfillment urlTemplate="https://fit-actions.firebaseapp.com/start{?exerciseType}">
<!-- Define how the actions parameters (intentParameter) is mapped in the urlTemplate above -->
<parameter-mapping
intentParameter="exercise.name"
urlParameter="exerciseType" />
</fulfillment>
<!-- We can define our custom inline inventory, mapping a parameter to an entity set reference -->
<parameter name="exercise.name">
<entity-set-reference entitySetId="ExerciseEntitySet" />
</parameter>
</action>
<action intentName="actions.intent.STOP_EXERCISE">
<fulfillment urlTemplate="https://fit-actions.firebaseapp.com/stop" />
</action>
<action intentName="actions.intent.GET_EXERCISE_OBSERVATION">
<!-- You can define the fulfillment mode, it can be SLICE or DEEPLINK -->
<!-- When slice is used, make sure you are supporting slices in your app -->
<!-- Also, not that the urlTemplate must be of the style content://{slice_provider_authority}/... -->
<fulfillment
fulfillmentMode="actions.fulfillment.SLICE"
urlTemplate="content://com.devrel.android.fitactions.FitSliceProvider/stats{?exerciseType}">
<!-- If a parameter is set as required, the action will only be fulfilled if the parameter is found -->
<!-- That's why a fallback urlTemplate needs to be provided for such case. -->
<parameter-mapping
entityMatchRequired="true"
intentParameter="exerciseObservation.aboutExercise.name"
required="true"
urlParameter="exerciseType" />
<!-- Note, that for the parameter above we are setting entityMatchRequired="true" -->
<!-- This tells the Assistant to only use the entity set values to map this parameter -->
<!-- Meaning that even if the assistant know how to identify the exercise (i.e "Climbing") -->
<!-- if it's not defined in our entity set, the parameter won't be use. -->
</fulfillment>
<!-- In case the exercise name is not found we fallback to the stats deep-link inside the app -->
<fulfillment
fulfillmentMode="actions.fulfillment.DEEPLINK"
urlTemplate="https://fit-actions.firebaseapp.com/stats" />
<!-- Same as the first action, we map the parameter name with out supported entity set. -->
<parameter name="exerciseObservation.aboutExercise.name">
<entity-set-reference entitySetId="ExerciseEntitySet" />
</parameter>
</action>
<!-- Defines an entity set with our supported entities -->
<entity-set entitySetId="ExerciseEntitySet">
<!-- For each entity you can specify the name, alternate names and the identifier -->
<!-- The identifier is the value that will be added to the action uri. -->
<!-- For our sample we map the supported entities with the class FitActivity.Type -->
<entity
name="@string/activity_running"
alternateName="@array/runningSynonyms"
identifier="RUNNING" />
<entity
name="@string/activity_walking"
alternateName="@array/walkingSynonyms"
identifier="WALKING" />
<entity
name="@string/activity_cycling"
alternateName="@array/cyclingSynonyms"
identifier="CYCLING" />
</entity-set>
menifest code
<activity
android:name=".BaseE12"
android:alwaysRetainTaskState="true"
android:configChanges="orientation|keyboardHidden|screenSize"
android:keepScreenOn="true"
android:label="@string/app_name"
android:launchMode="singleTop"
android:showOnLockScreen="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="com.google.android.gms.actions.SEARCH_ACTION"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
<!-- Define your supported deeplinks -->
<intent-filter
android:autoVerify="true"
tools:targetApi="m">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="fit-actions.firebaseapp.com"
android:scheme="https" />
</intent-filter>
</activity> <meta-data
android:name="com.google.android.actions"
android:resource="@xml/actions" />
idea.log
Successful Submit Actions Response:{
"assistantLink": "https://assistant.google.com/services/invoke/uid/000013ca101a9334",
"supportedIntents": [
{
"name": "actions.intent.START_EXERCISE",
"supportedParameters": [
{
"name": "exercise",
"exampleValues": [
"{\"@context\":\"http://schema.googleapis.com\",\"@type\":\"Exercise\",\"name\":\"Running\"}"
]
}
]
},
{
"name": "actions.intent.STOP_EXERCISE",
"supportedParameters": [
{
"name": "exercise",
"exampleValues": [
"{\"@context\":\"http://schema.googleapis.com\",\"@type\":\"Exercise\"}"
]
}
]
},
{
"name": "actions.intent.GET_EXERCISE_OBSERVATION",
"supportedParameters": [
{
"name": "exerciseObservation",
"exampleValues": [
"{\"@context\":\"http://schema.googleapis.com\",\"aboutExercise\":{\"name\":\"Climbing\",\"@type\":\"Exercise\"},\"@type\":\"ExerciseObservation\"}"
]
}
]
}
],
"previewSettings": {
"invocationName": "my app"
}
}