• This repository has been archived on 27/Feb/2024
  • Stars
    star
    173
  • Rank 220,124 (Top 5 %)
  • Language
    Kotlin
  • License
    Apache License 2.0
  • Created over 5 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A sample that shows how to make Android Apps available from the Assistant using App Actions.

*⚠️ Warning: Go to App Actions fitness sample or App Actions Widget sample for maintained sample.

⚠️ Warning: This App Actions fitness sample and App Actions Widget sample has migrated to App-Action directory in Android Github. This version will no longer be maintained.

This is a sample Fitness application that allows displaying workout information as well as starting and stopping a workout. By implementing App Actions, we allow the user to call upon our application to fulfill supported built-in intents (BIIs) in the fitness category.

Specifically, this sample supports the following BIIs:

  • actions.intent.START_EXERCISE: Open the sample app and start an exercise session.
  • actions.intent.STOP_EXERCISE: Open the sample app and stops the current exercise session.
  • actions.intent.GET_EXERCISE_OBSERVATION: Display a widget inside the Assistant with information on a particular exercise statistic.

alt-text

How to use this sample

Clone or download the project to your preferred location. Then, import and modify the project with the following steps:

  1. In Android Studio, select Open an existing Android Studio project from the initial screen, or go to File > Open.

  2. Change the applicationId in app/build.gradle to the applicationId of one of your draft or published apps in the Google Play Console.

    android {
        defaultConfig {
            // This ID uniquely identifies your app on the device and in Google Play
            applicationId "PUT_YOUR_APPLICATION_ID_HERE"
        }
    }
  3. Change the three (3) android:targetPackage in app/src/main/res/xml/shortcuts.xml to the applicationId in your app/build.gradle.

    <capability android:name="actions.intent.START_EXERCISE">
        <intent
            android:targetPackage="PUT_YOUR_APPLICATION_ID_HERE"
            >
        </intent>
    </capability>
    <capability android:name="actions.intent.STOP_EXERCISE">
        <intent
            android:targetPackage="PUT_YOUR_APPLICATION_ID_HERE"
            >
        </intent>
    </capability>
    <capability android:name="actions.intent.GET_EXERCISE_OBSERVATION">
        <intent
            android:targetPackage="PUT_YOUR_APPLICATION_ID_HERE"
            >
        </intent>
    </capability>
  4. In Android Studio, find the root directory of the sample.

  5. Select the build.gradle file.

  6. Follow the instructions presented by the IDE.

  7. Install Google Assistant plugin for Android Studio

Then, you can try the App Actions by following these steps:

  1. Build and run the sample on your physical test device (Run "app").
  2. Open the App Actions test tool (Tools > Google Assistant > App Actions Test Tool).
  3. Define an invocation name to use for invoking the App Actions (like "my test app"). This name is only for testing purposes, so it can be different from what you want to deploy to production later.
  4. Click Create Preview. Once your preview is created, the test tool window updates to display information about BIIs found in your shortcuts.xml file.

After you create a preview, you can then try using voice or written commands directly with Assistant on your test device.

If you run into any issues, check out the troubleshooting guide in our developer documentation.

Contribution guidelines

If you want to contribute to this project, be sure to review the contribution guidelines.

We use GitHub issues for tracking requests and bugs, please get support by posting your technical questions to Stack Overflow.

Report general issues with App Actions features or make suggestions for additional built-in intents through our public issue tracker.

References

License

Copyright 2019 Google LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

More Repositories

1

actions-on-google-nodejs

Node.js client library for Actions on Google
TypeScript
900
star
2

smart-home-nodejs

A sample of the Smart Home device control APIs in Actions on Google
TypeScript
851
star
3

actions-on-google-java

Java/Kotlin library for Actions on Google
Kotlin
287
star
4

codelabs-nodejs

Actions on Google Codelabs
JavaScript
264
star
5

smart-home-local

Local Home SDK sample
TypeScript
255
star
6

dialogflow-webhook-boilerplate-nodejs

Webhook Boilerplate (using Dialogflow) in Node.js
JavaScript
187
star
7

dialogflow-facts-about-google-nodejs

Custom Entities, Contexts, and Deep Links sample (using Dialogflow) in Node.js
JavaScript
185
star
8

assistant-conversation-nodejs

A developer friendly way to fulfill Actions SDK handlers for the Google Assistant
TypeScript
104
star
9

dialogflow-number-genie-nodejs

Localization sample (using Dialogflow) in Node.js
JavaScript
87
star
10

smart-home-java

Java
86
star
11

dialogflow-interactive-canvas-nodejs

A sample that demonstrates how to create an Interactive Canvas experience using Actions on Google for the Google Assistant.
JavaScript
76
star
12

actions-on-google-testing-nodejs

TypeScript
74
star
13

smart-home-dashboard

TypeScript
73
star
14

dialogflow-iosched-nodejs

The Action for the Google Assistant for Google I/O '18
JavaScript
71
star
15

dialogflow-transactions-nodejs

Physical transactions sample (using Dialogflow) in Node.js
JavaScript
67
star
16

local-home-sdk

Local Home SDK
CSS
67
star
17

dialogflow-conversation-components-nodejs

Rich Responses sample (using Dialogflow) in Node.js
JavaScript
66
star
18

dialogflow-updates-nodejs

Daily Updates & Push Notifications Sample (using Dialogflow) in Node.js
JavaScript
59
star
19

dialogflow-silly-name-maker

Parameters sample (using Dialogflow) in Node.js (no webhook)
59
star
20

actionssdk-say-number-nodejs

Say a number Actions SDK sample for Actions on Google
JavaScript
57
star
21

gactions

Go
49
star
22

dialogflow-name-psychic-nodejs

Permissions and Google Maps Static API sample (using Dialogflow) in Node.js
JavaScript
47
star
23

dialogflow-silly-name-maker-webhook-nodejs

Parameters sample (using Dialogflow) in Node.js
JavaScript
46
star
24

appactions-common-biis-kotlin

This sample Android app manages items on to-do lists using Google Assistant implemented via App Actions.
Kotlin
44
star
25

dialogflow-webhook-boilerplate-java

Webhook Boilerplate using the Java client library for Actions on Google
Java
35
star
26

actions-builder-canvas-nodejs

Interactive Canvas sample (using Actions Builder) in Node.js
JavaScript
26
star
27

dialogflow-google-sign-in-nodejs

Google Sign-In sample (using Dialogflow) in Node.js
HTML
25
star
28

smart-home-frontend

JavaScript
24
star
29

dialogflow-quotes-nodejs

External API sample (using Dialogflow) in Node.js
JavaScript
24
star
30

dialogflow-ssml-nodejs

SSML sample (using Dialogflow) in Node.js
JavaScript
23
star
31

assistant-conversation-testing-nodejs

Assistant conversation testing library
TypeScript
21
star
32

dialogflow-snowman-nodejs

Snowman Interactive Canvas Sample
JavaScript
19
star
33

smart-home-schema

19
star
34

dialogflow-gdg-nodejs

Localization, Meetup API & Cloud Translation API sample (using Dialogflow) in Node.js
JavaScript
19
star
35

assistant-conversation-schema

JSON Schema types for fulfilling Actions SDK handlers for the Google Assistant
19
star
36

actions-builder-conversation-components-nodejs

Conversation Components sample (using Actions Builder) in Node.js
TypeScript
15
star
37

dialogflow-quickstart-nodejs

Documentation samples for Actions on Google (Dialogflow/Node.js)
JavaScript
14
star
38

actions-builder-hello-world-nodejs

Hello World sample (using Actions Builder) in Node.js
JavaScript
13
star
39

create-local-home-app

Create a new Local Home SDK app.
TypeScript
13
star
40

dialogflow-helper-intents-nodejs

Helper Intents sample (using Dialogflow) in Node.js
JavaScript
13
star
41

actionssdk-conversation-components-nodejs

Rich Responses sample (using Actions SDK) in Node.js
JavaScript
12
star
42

assistant-actions-nodejs

Node.js Actions API Client Library
JavaScript
12
star
43

actionssdk-updates-nodejs

Daily Updates & Push Notifications Sample (using Actions SDK) in Node.js
JavaScript
12
star
44

actions-builder-codelab-level-1

Actions Builder Codelab (Level 1)
JavaScript
11
star
45

dialogflow-facts-about-google-java

Custom Entities, Contexts, and Deep Links sample (using Dialogflow) in Java
Java
11
star
46

interactive-canvas-devtools

A Chrome DevTools extension for Interactive Canvas development
CSS
10
star
47

dialogflow-digital-goods-nodejs

Digital Purchase API sample (using Dialogflow) in Node.js
JavaScript
9
star
48

dialogflow-google-sign-in-java

Google Sign-In sample (using Dialogflow) in Java
Java
8
star
49

dialogflow-conversation-components-java

Rich Responses sample (using Dialogflow) in Java
Java
8
star
50

dialogflow-name-psychic-java

Permissions, SSML, Surface Transfers, and Google Maps Static API sample (using Dialogflow) in Java
Java
8
star
51

actionssdk-shiritori-ja-nodejs

しりとり AoG サンプルゲーム
JavaScript
8
star
52

actions-builder-account-linking-nodejs

Account Linking sample (using Actions Builder) in Node.js
JavaScript
8
star
53

actions-builder-patterns-nodejs

Common design patterns for Actions Builder
JavaScript
8
star
54

user-engagement-codelab-nodejs

User Engagement Codelab - https://codelabs.developers.google.com/codelabs/actions-user-engagement
JavaScript
7
star
55

actions-builder-custom-nlu-nodejs

Custom NLU sample (using Actions Builder) in Node.js
JavaScript
7
star
56

actions-builder-codelab-level-2

Actions Builder Codelab (Level 2)
JavaScript
7
star
57

actions-builder-canvas-codelab-nodejs

JavaScript
6
star
58

dialogflow-transactions-java

Physical Goods Transactions API sample (using Dialogflow) in Java
Java
6
star
59

actionssdk-updates-java

Daily Updates & Push Notifications Sample (using Actions SDK) in Java
Java
6
star
60

actions-shortcut-convert

Kotlin
6
star
61

dialogflow-silly-name-maker-webhook-java

Parameters sample (using Dialogflow) in Java
Java
5
star
62

actions-builder-transactions-nodejs

Transactions sample (using Actions Builder) in Node.js
JavaScript
5
star
63

dialogflow-quickstart-java

Documentation samples for Actions on Google (Dialogflow/Java)
Java
5
star
64

actionssdk-say-number-java

SSML sample (using Actions SDK) in Java
Java
4
star
65

app-actions-dynamic-shortcuts

A sample app that demonstrates how to push dynamic shortcuts that can be displayed in Google Assistant.
Kotlin
4
star
66

actions-builder-updates-nodejs

Daily Updates and Notifications sample (using Actions Builder) in Node.js
JavaScript
4
star
67

smart-home-error-reporting

HTML
3
star
68

dialogflow-number-genie-java

Localization sample (using Dialogflow) in Java
Java
3
star
69

actionssdk-quickstart-java

Documentation samples for Actions on Google (Actions SDK/Java)
Java
3
star
70

actionssdk-vscode-extension

2
star
71

actions-on-google-linter-nodejs

JavaScript
2
star
72

dialogflow-session-entities-plugin-nodejs

TypeScript
2
star
73

dialogflow-helper-intents-java

Helper Intents sample (using Dialogflow) in Java
Java
2
star
74

dialogflow-interactive-canvas-codelab-nodejs

Interactive Canvas with Dialogflow Codelab
JavaScript
2
star
75

actionssdk-conversation-components-java

Rich Responses sample (using the Actions SDK) in Java
Java
2
star
76

dialogflow-updates-java

Daily Updates & Push Notifications Sample (using Dialogflow) in Java
Java
2
star
77

dialogflow-digital-goods-plugin-nodejs

TypeScript
1
star
78

actions-builder-canvas-angular

TypeScript
1
star
79

dialogflow-ssml-java

SSML sample (using Dialogflow) in Java
Java
1
star
80

actionssdk-quickstart-nodejs

Documentation samples for Actions on Google (Actions SDK/Node.js)
JavaScript
1
star
81

actions-builder-location-nodejs

JavaScript
1
star
82

dialogflow-quotes-java

External API sample (using Dialogflow) in Java
Java
1
star
83

.allstar

1
star
84

actions-builder-facts-about-google-nodejs

Facts About Google sample (using Actions Builder) in Node.js
JavaScript
1
star