android / app-actions-samples Goto Github PK
View Code? Open in Web Editor NEWSamples demonstrating the use of App Actions
License: Apache License 2.0
Samples demonstrating the use of App Actions
License: Apache License 2.0
I will follow the steps below to configure my project:
1、add shortcuts.xml , and use meta-data reference on Activity(android.intent.action.MAIN and android.intent.category.LAUNCHER)
<meta-data
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
2、config shortcuts.xml as
<?xml version="1.0" encoding="utf-8"?>
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
<capability android:name="actions.intent.GET_THING">
<intent
android:action="android.intent.action.VIEW"
android:targetClass="com.etekcity.vesyncplatform.wellness.ui.WellnessDeviceEnableActivity"
android:targetPackage="com.etekcity.vesyncplatform">
<parameter
android:name="thing.name"
android:key="query" />
</intent>
</capability>
</shortcuts>
3、build generate aab upload to Google Play. I refer https://developer.android.com/guide/app-actions/get-started。
4、in the end, use Google Assistant test on AS. tips: Sorry, I couldn't find that.
5、Of course,I say "Hey Google, Find Recipe on ExampleApp" tips: to install tip.but My application was Internal testing version.
I am trying to get the completed version of this working but I'm getting a Toast message saying "App isn't installed" after trying to run the app action using the Google Assistant Plugin. I'm targeting API 33 and I'm currently using Android Studio Dolphin | 2021.3.1 Patch 1. I tried the old version of the codelab and that same error appears.
Hi, I am trying to implement custom intent with the app action widget, but unable to invoke the app from the voice command.
I tried BII GET_EXERCISE_OBSERVATION and it works both from the plugin and assistant voice query, all other BII and custom intent are working normally except the one used with the app widget.
I am confused as either it is a bug or we cannot use custom intent with widgets as some BII are also not eligible for app action widgets.
This link part of document says "Speaking a query to Assistant that triggers a built-in intent (BII) or custom intent configured for widget fulfillment." and I believe this means custom intent can work with app widgets.
here is the code for shortcut
<shortcut
android:shortcutId="GET_DATA"
android:shortcutShortLabel="@string/activity_get_data">
<capability-binding android:key="custom.actions.intent.GET_DATA_OBSERVATION">
<parameter-binding
android:key="aboutGetData"
android:value="@array/getDataSynonyms"/>
</capability-binding>
</shortcut>
and capability
<capability android:name="custom.actions.intent.GET_DATA_OBSERVATION"
app:queryPatterns="@array/getDataQueries">
<app-widget
android:identifier="GET_DATA_OBSERVATION"
android:targetClass="PUT_YOUR_APPLICATION_ID_HERE.fitactions.widgets.StatsWidgetProvider"
android:targetPackage="PUT_YOUR_APPLICATION_ID_HERE">
<parameter
android:name="aboutGetData"
android:key="aboutGetData"
android:required="true">
</parameter>
<extra android:name="hasTts" android:value="true"/>
</app-widget>
<intent
android:identifier="GET_DATA_FALLBACK"
android:action="android.intent.action.VIEW"
android:targetClass="PUT_YOUR_APPLICATION_ID_HERE.fitactions.widgets.StatsWidgetProvider">
</intent>
</capability>
and this is my query array
<array name="getDataQueries">
<item>get data from last activity</item>
<item>get information from last activity</item>
<item>tell info from last activity</item>
<item>tell information from last activity</item>
</array>
<array name="getDataSynonyms">
<item>info</item>
<item>data</item>
<item>value</item>
<item>information</item>
</array>
Caused by: java.lang.IllegalArgumentException: org.ridcully.test.assistant: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
AndroidStudio shows error that targetSdkVersion is too low. Needs to be changed to at least 31.
Hi! I just wondered if theres an updated list for the BIIs? The one's on the official documentation;
https://developer.android.com/reference/app-actions/built-in-intents/common/create-thing
seem to all be outdated or deprecated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.