简体   繁体   中英

Google voice assistant command not working for action CREATE_NOTE

Hello I want to execute activity by CREATE_NOTE action for that I have done below code

AndroidMenifest.xml

        <activity android:name=".activities.VoiceSearchActivity">
            <intent-filter>
                <action android:name="com.google.android.gms.actions.CREATE_NOTE"/>
                <category android:name="android.intent.category.DEFAULT"/>
                <data android:mimeType="text/plain"/>
            </intent-filter>
        </activity>

I have not published my app in Google Play Store so for testing purpose I am using below code in Android's Terminal

adb shell am start -a com.google.android.gms.actions.CREATE_NOTE  com.vocieserach.example

But every time I am getting below error

Error: Activity not started, unable to resolve Intent { act=com.google.android.gms.actions.CREATE_NOTE flg=0x10000000 pkg=com.vocieserach.example }

Any body please can help me what is the issue

I have finally done by executing below line in terminal

adb shell am start -a com.google.android.gms.actions.CREATE_NOTE -t "text/plain" -e query VoiceSearch com.vocieserach.example


adb shell am start -a com.google.android.gms.actions.CREATE_NOTE -t "text/plain" -e "android.intent.extra.TEXT" "ADD BG READING 15 WITH DATE 11/05/2018 11:10:00 AM"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM