Android Question Help Ok Google

Lucas Siqueira

Active Member
Licensed User
Longtime User
Hello, I've already visited the links below and can't get it to work.




can someone test and help me fix the following problem?

I want to search for names in my app ...

I've tried to tell him: ok google, search for john in power.

but the app doesn't seem to recognize search commands.

if someone can post an example of a project that works, it would be great!

sorry for my English.
 

Attachments

  • okgoogle.zip
    8.1 KB · Views: 209

Lucas Siqueira

Active Member
Licensed User
Longtime User
In the google guide says that you have to add the intent ...


<activity android: name = ". SearchActivity">
<intent-filter>
<action android: name = "com.google.android.gms.actions.SEARCH_ACTION" />
<category android: name = "android.intent.category.DEFAULT" />
</intent-filter>
</activity>
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Have you tried to create such an Intentfilter?
 
Upvote 0

Lucas Siqueira

Active Member
Licensed User
Longtime User
Have you tried to create such an Intentfilter?

how can I create an Intentfilter?

in the source code in the manifest I created one, but I don't know if it's correct ... Can you see if I'm doing something wrong?

if you can test the code, sometimes I am not able to talk to the app to do the search ...
 
Upvote 0

Lucas Siqueira

Active Member
Licensed User
Longtime User

Thank you, I created, the manifest has:

AddActivityText(main,
<intent-filter>
<action android:name="com.google.android.gms.actions.SEARCH_ACTION"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>)

can you test the source code please?
 
Upvote 0

Lucas Siqueira

Active Member
Licensed User
Longtime User
No, i canΒ΄t. I have totally diabled OK GOOGLE on my Device.

I suggest to try it by yourself.

Sorry, but already corrects the translation!

can you take a look at the documentation if i'm doing it wrong?



com.google.android.gms.actions.SEARCH_ACTION
 
Upvote 0
Top