Commit 07899cbd authored by Krishna Bhilare's avatar Krishna Bhilare

Actions added from Sample App

parent 7269b768
...@@ -19,31 +19,71 @@ ...@@ -19,31 +19,71 @@
<!-- This file describes the supported actions by this app --> <!-- This file describes the supported actions by this app -->
<action intentName="android.intent.action.VIEW"> <action intentName="actions.intent.START_EXERCISE">
<!-- Each action requires at least one fulfillment that defines how the app will handle this action --> <!-- 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 --> <!-- Define the urlTemplate in the format you define your deeplinks in AndroidManifest.xml -->
<fulfillment urlTemplate="https://proteusvision.com/start{?type}"> <fulfillment urlTemplate="https://fit-actions.firebaseapp.com/start{?exerciseType}">
<!-- Define how the actions parameters (intentParameter) is mapped in the urlTemplate above --> <!-- Define how the actions parameters (intentParameter) is mapped in the urlTemplate above -->
<parameter-mapping <parameter-mapping
intentParameter="parameter.name" intentParameter="exercise.name"
urlParameter="type" /> urlParameter="exerciseType" />
</fulfillment> </fulfillment>
<!-- Map a parameter to an entity set reference --> <!-- Map a parameter to an entity set reference -->
<parameter name="parameter.name"> <parameter name="exercise.name">
<entity-set-reference entitySetId="VisionEntitySet" /> <entity-set-reference entitySetId="ExerciseEntitySet" />
</parameter> </parameter>
</action> </action>
<!-- Define an inline inventory --> <action intentName="actions.intent.STOP_EXERCISE">
<!-- This sample maps supported entities with the class Activity.Type --> <fulfillment urlTemplate="https://fit-actions.firebaseapp.com/stop" />
<entity-set entitySetId="VisionEntitySet"> </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}/... -->
<!-- Make sure that the authority matches with the one defined in AndroidManifest.xml -->
<fulfillment
fulfillmentMode="actions.fulfillment.SLICE"
urlTemplate="content://com.prokb.android.fitactions.slices.provider/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
intentParameter="exerciseObservation.aboutExercise.name"
required="true"
urlParameter="exerciseType" />
</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" />
</action>
<entity-set entitySetId="ExerciseEntitySet">
<entity
name="@string/activity_running"
identifier="RUNNING" />
<entity
name="@string/activity_walking"
identifier="WALKING" />
<entity
name="@string/activity_hiking"
identifier="HIKING" />
<entity <entity
name="image capturing" name="@string/activity_cycling"
identifier="CAPTURE" /> identifier="CYCLING" />
</entity-set> </entity-set>
</actions> </actions>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment