appactions-fitness-kotlin
appactions-fitness-kotlin copied to clipboard
Action not work via Assistant
action is running in the device via App Actions Test Tool but not working via voice or written commands in the Assistant.
below all steps are perfect in my case The plugin loaded the actions preview at least one time. The account in the device is the same as the one in Android Studio. The device has access to an internet connection. You are using the latest version of the Assistant or Google app.
I have a similar issue when I click run on App Actions Test Tool, I get Sorry, I couldn't find that from the assistant
@nimish17 same here.
Could you share which action are you trying and your actions xml file?
<!-- 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>
I too have faced same issue in nexus 5 mobile but it is working in oneplus mobile. anyways issue in some mobiles.
Sorry for the delayed answer. Did you manage to make it run?
If not make sure:
- All the above you mentioned is correct and you can run the aciton via plugin
- When uploading the preview check the name you are using to upload, this is the one that you have to say
- Try this sentence "Start running in Fit Actions"
- Try modifying the acitons.xml and remove the in-line inventory (aka entity-set)
@skimarxall Same issue I am also facing if anyone has fixed please reply to the same thread. Steps:
Uploaded the APK to play store internal test track in draft mode Logged in with same account to (Device, PlayConsole and Android Studio) Changed the packageId to the app which I have uploaded to playstore Running App Actions Test Tool -> Preview uploaded successfully Run -> Opens Assistant in device with message 'Sorry, Couldn't find that' Let me know if I have missed any step. Thank you
@harshfast are you using the account that you use to publish the apk in the device? Open google search, and make sure the account selected there is the same.
Also, can you tell us which Google app version are you using?
@skimarxall Thanks for quick response Now I am able to see the Android Slices and App Actions via google assistant. It started working I just checked all me configuration and everything looks good.
Steps I performed: Checked all my logins (Test Device, Play Console and Android Studio) Freshly installed the application with the package name which was uploaded to playstore. Deleted actions preview and uploaded again from AATT.(App Actions Test Tool) Run the command it started launching the app via google assistant and showing the slice from app inside google assistant window.
Just a quick query how can i trigger the voice commands for the same instead of adb command generated by AATT?
Thank you again for your help.
Just a quick query how can i trigger the voice commands for the same instead of adb command generated by AATT?
Go here: https://developers.google.com/actions/reference/built-in-intents/
Find your the Assistant Intent you want to test, and look under "example queries" that you can use to try (you should be able to trigger via voice or by manually typing into Google Assistant using the keyboard).
Note that actions.intent.OPEN_APP_FEATURE doesn't currently have any samples right now and is broken outside of the Test Tool (https://issuetracker.google.com/issues/135714718).
@adamkoch I am using actions.intent.GET_TAXI_RESERVATION
Voice Command: "Call my driver with
Google assistant shows generic search results rather showing my app slice. Also it has mentioned here "The App Actions feature is currently in developer preview. You can build and test App Actions (en-US locale only), but user triggering from the Assistant is not available yet. "
is it possible to trigger voice command or for now adb command will work?
As per the Built-in intents page, GET_TAXI_RESERVATION should trigger with a test voice query of "Call my driver with [app name]". If it's not working, make sure (once again) that you are logged in with the right Google account that has the preview published via the Test Tool and that you have the right APK installed.
And yes, you should switch to en-US locale on your device and in Assistant settings for now to test as it won't trigger in other locales.
If it's still not working, you can file an issue here.
You may also want to try the fitness actions via voice query first (using the sample app) because those definitely work fine.
@adamkoch I have few queries before proceeding with the actual implementation, your help will be appreciated
- Can we create our own built-in-intent as I am not able to find the matching BII in current list. If yes, please let me know the procedure and the time it will take to be available for POC.
- Will this newly created intent will be exclusive to my application?
- Will google assistant display multiple slices if more than one app is able to fulfill the user query or multiple apps has the same intents?
Thank you.
Can we create our own built-in-intent as I am not able to find the matching BII in current list. If yes, please let me know the procedure and the time it will take to be available for POC.
No, you can't. You can request additional intents here: https://issuetracker.google.com/issues/new?component=617864&template=1261453
Will google assistant display multiple slices if more than one app is able to fulfill the user query or multiple apps has the same intents?
Right now, the user specifies the app name in their query, so only one app will ever be able to respond to the query (Slices or otherwise).
Thank you @adamkoch for your quick response. It gives us direction to build the app experience accordingly.
As per the Built-in intents page, GET_TAXI_RESERVATION should trigger with a test voice query of "Call my driver with [app name]". If it's not working, make sure (once again) that you are logged in with the right Google account that has the preview published via the Test Tool and that you have the right APK installed.
And yes, you should switch to en-US locale on your device and in Assistant settings for now to test as it won't trigger in other locales.
If it's still not working, you can file an issue here.
You may also want to try the fitness actions via voice query first (using the sample app) because those definitely work fine.
I tried triggering voice queries for FitActions sample as suggested in above answer but it didn't work. I have raised below issue with screenshots for your reference. https://issuetracker.google.com/issues/141225979
Is there any specific region that you need to choose in Google Assistant? Like only en-US is supported, or en-IN is also supported?
Right now, App Actions is targeting only en-US.
Is there any specific region that you need to choose in Google Assistant? Like only en-US is supported, or en-IN is also supported?
@vpulpatil The App Actions feature is currently in developer preview. You can build and test App Actions (en-US locale only), but user triggering from the Assistant is not available yet. Refer Here
action is running in the device via App Actions Test Tool but not working via voice or written commands in the Assistant.
below all steps are perfect in my case The plugin loaded the actions preview at least one time. The account in the device is the same as the one in Android Studio. The device has access to an internet connection. You are using the latest version of the Assistant or Google app.
Even I'm having the same issue. The action is getting triggered from the App Actions Test Tool but when I say "Start Running in Fit Actions" it just sends me some responses from Google. If you were able to make it work, kindly post the steps
Also make sure you have fully set up Google Assistant. Open Google Assistant and ensure you don't see anything indicating you need to finish setting it up. Usually this looks like a blue bar at the bottom of the screen but it may look different in some cases.
Also make sure you have fully set up Google Assistant. Open Google Assistant and ensure you don't see anything indicating you need to finish setting it up. Usually this looks like a blue bar at the bottom of the screen but it may look different in some cases.
![]()
Yes I checked this as well. I think Google Assistant is not being able to match the query "Start running in Fit Actions" with the START_EXERCISE intent.
Also make sure the invocation name (that is shown in the Studio Plugin) matches the query you are using ("Fit Actions" in your query). You can update the invocation name if needed by deleting the preview and then before creating it again there will be a field to set it.
Also make sure the invocation name (that is shown in the Studio Plugin) matches the query you are using ("Fit Actions" in your query). You can update the invocation name if needed by deleting the preview and then before creating it again there will be a field to set it.
I tried deleting the preview and create it. Gave the name "Fit Actions". It works like a charm from the tool but it doesn't work for the same voice command.
Is there any other way to trigger the built-in intent actions.intent.START_EXERCISE?
Also make sure the invocation name (that is shown in the Studio Plugin) matches the query you are using ("Fit Actions" in your query). You can update the invocation name if needed by deleting the preview and then before creating it again there will be a field to set it.
It's working now!
- I deleted the preview and named it "Fit Actions"
- Tested with App Actions Tool - working perfectly
- Gave this voice command - "Start running in Fit Actions" Working perfectly now! Thanks @adamkoch for the help. Very much appreciated!
No luck for me as of yet! Followed all steps here. I deleted the preview and named it "Fit Actions", logged into to everything with the relevant account. checked to see if I could execute Deeplink with adb (I can). just can't get it running with the actions tool nor with assistant invocation
No luck for me as of yet! Followed all steps here. I deleted the preview and named it "Fit Actions", logged into to everything with the relevant account. checked to see if I could execute Deeplink with adb (I can). just can't get it running with the actions tool nor with assistant invocation
Are you getting any errors while testing on App Actions Test Tool? Because all the steps that you mentioned should enable you to test it successfully with at least App Actions Test Tool.
Nope. Just says "Sorry couldn't find that"
On Mon, 4 Nov 2019, 15:25 Chinmay Kulkarni, [email protected] wrote:
No luck for me as of yet! Followed all steps here. I deleted the preview and named it "Fit Actions", logged into to everything with the relevant account. checked to see if I could execute Deeplink with adb (I can). just can't get it running with the actions tool nor with assistant invocation
Are you getting any errors while testing on App Actions Test Tool? Because all the steps that you mentioned should enable you to test it successfully with at least App Actions Test Tool.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/actions-on-google/appactions-fitness-kotlin/issues/8?email_source=notifications&email_token=ACNBF2KT776Q6GS5BCWDVT3QSA5EZA5CNFSM4H4RXGGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC7UBMA#issuecomment-549404848, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACNBF2ILU5V6UMO2DC4KLYLQSA5EZANCNFSM4H4RXGGA .
@SoftwareMate02 Please try to verify below steps:
- Change the device and Google Assistant language as en-US.
- Check your login to all the three places: Android Studio, Playstore and Test Device.
- Check the package name and version code of the application at playstore and test application.
- Review your AndroidManifest and actions.xml.
- Remove and install fresh application to device.
- Delete the preview from AATT and create the fresh preview again.
- Sometimes Assistant always triggers "Sorry couldn't find that". It worked for me after multiple tries.
- If possible grab the stock android device(Pixel) and try with that.(This is optional it should work in every device)
- Check the logcat without and filter and capture the logs if it shows any failure regarding actions fulfillment.
@Grandolf49 Still I haven't verified with voice command but it is working with AATT for both Actions and Slices. Also have you verified with voice command using inline inventory words?
@Grandolf49 glad you got it working!
@SoftwareMate02 good advice from @harshfast, also make sure it all triggers fine using the Studio Test Tool plugin first, once that is working (but it's not triggering directly from Assistant) double check your Google accounts are matching up, that Assistant is fully setup (as per my comment above) and that you are using the right invocation name.