2
votes

Is it possible to display custom Activities / Fragments in "Actions on Google" (https://developers.google.com/actions/) ?

I see that they have their new Transaction API they want you to use, and they force you to use Google Payments API, or Google In-App purchases.

In their marketing videos, i don't see anything about opening regular apps from assistant, or using more customized UI, such as regular Android Activities. (https://www.youtube.com/watch?v=ZvyrvowZ4wQ)

Can you:

  1. Link back to your Android App from Actions, and continue there?

  2. Use custom UI right in Actions?

2

2 Answers

1
votes

Yes, it's possible but you need to send back your action via fcm/gcm from your fulfilment, and then your app can execute your action.

0
votes

No, it is not possible to display Android elements through Actions on Google. AoG is meant to work inside the Google Assistant, which runs on platforms besides Android.

You can provide a link, which can be an intent to your application, as part of the results but the user will have to click on this explicitly.

AoG is meant to be conversational, and the visual user interfaces that may be presented are meant to be integral parts of the conversation. While it does make sense to show some things from outside components, this is typically a sign that you should re-think what a conversation about the results should be. For example, you could provide a brief summary of the results with a link to the full results, or let the user ask followup questions about specific elements that they may be interested in (possibly with suggestion chips to provide guidance about what those elements may be).

While this is a separate question, I don't believe the Transaction API requires you to use the Google Payments API or In-App purchases for it. The presentation at I/O and the page at https://developers.google.com/actions/transactions/#integrating_with_the_transactions_api indicates that you can do payments in a variety of different ways.