Spaces in query SEARCH_ACTIONS Android

1

How do I add spaces to the query field with SEARCH_ACTION in android? Example:

IT WORKS:

adb shell am start -a com.google.android.gms.actions.SEARCH_ACTION -e query "enviar"  <nombre_paquete>

IT DOES NOT WORK

adb shell am start -a com.google.android.gms.actions.SEARCH_ACTION -e query "enviar dinero a pedro"  <nombre_paquete>

Error:

  

Starting: Intent {act = com.google.android.gms.actions.SEARCH_ACTION   pkg = money (has extras)} Error: Activity not started, unable to   resolve Intent {act = com.google.android.gms.actions.SEARCH_ACTION   flg = 0x10000000 pkg = money (has extras)}

    
asked by Emmanuel 10.12.2018 в 20:28
source

2 answers

0

I finally found the answer, it was only necessary to add "\" in each separation, like this.

    adb shell am start -a com.google.android.gms.actions.SEARCH_ACTION -e query "enviar\ dinero\ a\ pedro"  <nombre_paquete>
    
answered by 12.12.2018 / 22:41
source
1

Actually, your application must work in the same way that you try in the emulator, so that it works in production your application must be published in the Google Play Store.

Actually the error:

  

Activity not started, unable to resolve Intent {   act = com.google.android.gms.actions.SEARCH_ACTION

means that you can not resolve the intent SEARCH_ACTION .

Make sure that I have the intent-filter correctly defined, check this example:

  <activity
        android:name=".SearchableActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="com.google.android.gms.actions.SEARCH_ACTION"/>
            <category android:name="android.intent.category.DEFAULT"/>
        </intent-filter>

        <meta-data
            android:name="android.app.searchable"
            android:value=".SearchableActivity" />

    </activity>
    
answered by 10.12.2018 в 23:40