actions-on-google / appactions-fitness-kotlin

A sample that shows how to make Android Apps available from the Assistant using App Actions.
Apache License 2.0
176 stars 86 forks source link

Action not work via Assistant #8

Open nimish17 opened 5 years ago

nimish17 commented 5 years ago

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.

donkii commented 5 years ago

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

NoluckJustSkills commented 5 years ago

@nimish17 same here.

marcelpinto commented 5 years ago

Could you share which action are you trying and your actions xml file?

nimish17 commented 5 years ago
AnilKolla commented 5 years ago

I too have faced same issue in nexus 5 mobile but it is working in oneplus mobile. anyways issue in some mobiles.

marcelpinto commented 5 years ago

Sorry for the delayed answer. Did you manage to make it run?

If not make sure:

harshfast commented 5 years ago

@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

marcelpinto commented 5 years ago

@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?

harshfast commented 5 years ago

@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.

adamkoch commented 5 years ago

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).

harshfast commented 5 years ago

@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?

adamkoch commented 5 years ago

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.

harshfast commented 5 years ago

@adamkoch I have few queries before proceeding with the actual implementation, your help will be appreciated

Thank you.

adamkoch commented 5 years ago

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).

harshfast commented 5 years ago

Thank you @adamkoch for your quick response. It gives us direction to build the app experience accordingly.

harshfast commented 5 years ago

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

vpulpatil commented 5 years ago

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?

adamkoch commented 5 years ago

Right now, App Actions is targeting only en-US.

harshfast commented 5 years ago

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

Grandolf49 commented 5 years ago

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

adamkoch commented 5 years ago

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.

Screen Shot 2019-11-01 at 10 22 16 AM
Grandolf49 commented 5 years ago

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.

Screen Shot 2019-11-01 at 10 22 16 AM

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.

adamkoch commented 5 years ago

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.

Grandolf49 commented 5 years ago

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?

Grandolf49 commented 5 years ago

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!

  1. I deleted the preview and named it "Fit Actions"
  2. Tested with App Actions Tool - working perfectly
  3. Gave this voice command - "Start running in Fit Actions" Working perfectly now! Thanks @adamkoch for the help. Very much appreciated!
NNirosan02 commented 5 years ago

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

Grandolf49 commented 5 years ago

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.

NNirosan02 commented 5 years ago

Nope. Just says "Sorry couldn't find that"

On Mon, 4 Nov 2019, 15:25 Chinmay Kulkarni, notifications@github.com 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 .

harshfast commented 5 years ago

@SoftwareMate02 Please try to verify below steps:

@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?

adamkoch commented 5 years ago

@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.

mmaSunshine commented 5 years ago

@skimarxall same here ,I follow all this steps,but no luck for me ,It's remind me sorry and can't found it. I checked: 1.make sure my login in three places:Android Studio, Play console and Test Device. 2.make sure the package name is my own. 3.remove and install fresh application to device. 4.Delete the preview from AATT and create the fresh preview again. 5.test the sample via adb in terminal ,not AAPT,the code is adb shell am start -a android.intent.action.VIEW -d 'https://fit-actions.firebaseapp.com/start' ,the sample can run but it still can't run on AATT.

dzuluaga commented 5 years ago

Are you using Android Emulator or a physical device? Physical devices work at the moment.

harshfast commented 4 years ago

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!

  1. I deleted the preview and named it "Fit Actions"
  2. Tested with App Actions Tool - working perfectly
  3. Gave this voice command - "Start running in Fit Actions" Working perfectly now! Thanks @adamkoch for the help. Very much appreciated!

@adamkoch @Grandolf49 Thanks for your responses. It worked with voice command as well. "Start running in Fit Actions". Still want to understand the logic behind the Invocation name and voice command as if we have our own Action defined with different app name. what invocation name should i provide for action let's say "actions.intent.CREATE_TAXI_RESERVATION" ?

adamkoch commented 4 years ago

@harshfast the invocation name is only configured/set for preview mode (via the studio test tool). in production, when you launch, the invocation name will simply be your app name. whatever invocation name you choose, it will be used for all the actions you have defined in your actions.xml. likewise in production, your app name will be used for all the actions you have defined.

aab0y07 commented 4 years ago

Just use your physical device as an emulator, not virtual one!!!

Stalker11 commented 4 years ago

Hello everyone! I have similar problem. I have cloned fit actions app example, changed applicationId and upload app bundle to developers console.

Снимок экрана 2020-06-04 в 15 22 03

I can debug app using App Actions Test Tool plugin, but when I try to start running Test App Action Google assistant write message "Sorry, I cold not find that" GAExample Account of developers console, Android Studio and device is the same.

What can be wrong? Why it does not work?

aab0y07 commented 4 years ago

Are u using real device as an emulator?

On Thu, Jun 4, 2020, 14:40 Oleg notifications@github.com wrote:

Hello everyone! I have similar problem. I have cloned fit actions app example, changed applicationId and upload app bundle to developers console. [image: Снимок экрана 2020-06-04 в 15 22 03] https://user-images.githubusercontent.com/15062516/83756839-4a3cb400-a678-11ea-9879-7169b7708602.png I can debug app using App Actions Test Tool plugin, but when I try to start running Test App Action Google assistant write message "Sorry, I cold not find that" [image: GAExample] https://user-images.githubusercontent.com/15062516/83756929-6a6c7300-a678-11ea-8c6f-4ac2aae8fe7c.png Account of developers console, Android Studio and device is the same.

What can be wrong? Why it does not work?

— 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#issuecomment-638822119, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGLJAQWRDKRKFLQ3VEVYKLTRU6I4ZANCNFSM4H4RXGGA .

aab0y07 commented 4 years ago
  1. Emulator should be physical device.
  2. Check and change the language settings on your device to "us-en".

On Thu, Jun 4, 2020, 15:07 Boydedaev Abdulhay aboydadaev@gmail.com wrote:

Are u using real device as an emulator?

On Thu, Jun 4, 2020, 14:40 Oleg notifications@github.com wrote:

Hello everyone! I have similar problem. I have cloned fit actions app example, changed applicationId and upload app bundle to developers console. [image: Снимок экрана 2020-06-04 в 15 22 03] https://user-images.githubusercontent.com/15062516/83756839-4a3cb400-a678-11ea-9879-7169b7708602.png I can debug app using App Actions Test Tool plugin, but when I try to start running Test App Action Google assistant write message "Sorry, I cold not find that" [image: GAExample] https://user-images.githubusercontent.com/15062516/83756929-6a6c7300-a678-11ea-8c6f-4ac2aae8fe7c.png Account of developers console, Android Studio and device is the same.

What can be wrong? Why it does not work?

— 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#issuecomment-638822119, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGLJAQWRDKRKFLQ3VEVYKLTRU6I4ZANCNFSM4H4RXGGA .

Stalker11 commented 4 years ago

No, I am using real devices for testing. Huawei and Samsung

JinalAwaiya410 commented 4 years ago

@mmaSunshine Have you found any solution?I have same issue

I follow all this steps,but no luck for me ,It's remind me sorry and can't found it. I checked: 1.make sure my login in three places:Android Studio, Play console and Test Device. 2.make sure the package name is my own. 3.remove and install fresh application to device. 4.Delete the preview from AATT and create the fresh preview again. 5.test the sample via adb in terminal ,not AAPT,the code is adb shell am start -a android.intent.action.VIEW -d 'https://fit-actions.firebaseapp.com/start ',the sample can run but when run in Test tool its not working.

It gives error "Sorry i couln't find that" I am using real devices for testing. Samsung. Please help me for solve this issue.

dzuluaga commented 4 years ago

I've compiled a living and breathing list here list. Try these options and let me know how it goes.

nicolasjafelle commented 4 years ago

@dzuluaga @adamkoch Hey! I know that maybe this is not the plase to ask but probably it is also a good place to understand what is going on with my integration. So I managed to integrate my app with Google assistant and the AATT works excellent with my local device and my local environment. I have an internal test channel in Google Play for QA things so our testers can do their work by simple downloading our test builds in Google Play. I already uploaded the build with the actions.xml and checked the Actions on Google on the Play Store.

The problem is that our QA testers cannot trigger by any means the "Hey Google, show info about this on xxx app". That means that we need to wait till release the build for production (going live massively) to allow everyone else use the Google Assistant capabilities in our app? Is there a way that other people with their phones and their personal account (gmail account) be able to test it before release?

There is also a form we already submitted but still do not receive any feedback from Google Team. Thanks in advance!

dzuluaga commented 4 years ago

Google Assistant should work once the preview gets created for that particular account. Could you verify that your tester is using the same account? If not, you need to create a preview using AATT with the tester account. What's your package id? Please send us your package id through the support form. Thanks!

nicolasjafelle commented 4 years ago

hey! @dzuluaga how fast to reply, thank you so much. I can confirm our testers are not using the same account. And they are not using the phones connected with ADB. So this is something maybe it is not supported the way we thought.. We have a Google play account and with this account we have other google accounts linked to allow testers and developers login with their accounts and check some insights of the build. For example: Root email: aaa@gmail.com Linked email: xxx@gmail.com - yyy@gmail.com

Do you think that it will only work if the phone is connected with aaa@gmail.com but not with xxx@gmail.com and yyy@gmail.com ??

BTW already submitted the form, couple of minutes ago. Thanks again.

dzuluaga commented 4 years ago

Hi, nicolasjafelle@ You can grant access to multiple testers. https://developers.google.com/assistant/app/test-tool#additional-testers. However, previews are linked to each Gmail account. So, make sure you create them from Android Studio.

Someone from the Support team will be in touch with you. Let know if you don't get a response in about a week.

nicolasjafelle commented 4 years ago

@dzuluaga aahh! good to know!! thank you so much for all your support. Last thing: When we send the build live to production we also need to link accounts? Or it just works because is a release build ? Thanks in advance!

dzuluaga commented 4 years ago

It just works as it's in prod. Do you still want to release this build in prod and then test? Or want to try in QA first using the above recommendation. Please send a request to the same support form if you're going to wait.

Rathish100 commented 3 years ago

@dzuluaga I could able to run the command successfully via "App Action Tool Plugin", But when I try to use the same command via voice from the google assistant screen, it's just showing web results.

  1. Logged in using the same credentials (Android Studio, Google Console, Real Device - Samsung s10+) and Device language set to EN-US
  2. Selected App Action tool plugin from the tools menu
  3. Gave invocation name (todo app) and locale to En-US
  4. Changed default feature "History" with my command (In my case "Open active tasks in todo app")
  5. Tapped on Update Preview.
  6. Once the preview updated, Run the command via AATT tool, it's working perfectly.
  7. Opened Google Assistant screen in a Real device and gave voice command (Open active tasks in todo app), but its showing web results in Assistant screen instead of showing my App.

Please let me know if I'm missing anything here.

rajpalrohit7 commented 3 years ago

I could able to run the command successfully via "App Action Tool Plugin", But when I try to use the same command via voice from the google assistant screen, it's just showing web results.

{ "@type": "Call", "callFormat": "Audio", "@context": "http://schema.googleapis.com", "participant": { "@type": "Person", "name": "John Doe", "telephone": "012-345-6789" } }

Above json is updated with call fetaure which is working from App Action Tool Plugin not from voice cmd: "call jhon doe on myapp"

dzuluaga commented 3 years ago

Please try to narrow down your issue by running this checklist.