androidgoogle-voice

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


Solution

  • 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"