Developers only need a few lines of code to add their apps to Google Voice Search

Editorial Note: Talk Android may contain affiliate links on some articles. If you make a purchase through these links, we will earn a commission at no extra cost to you. Learn more.

Google_Voice_Search_Third_Party_Apps

We saw glimpses of this at Google I/O, and developers can now make their apps searchable through Google Voice Search. It only takes a few lines of code. Once added, apps can receive the SEARCH_ACTION intent containing the SearchManager.QUERYextra with the search expression.

Examples of such searches might be Ok Google, search pizza on Eat24” or Ok Google, search for hotels in Maui on TripAdvisor.” Imagine the possibilities.

Also, users now have the ability to enable OK Google hot-word detection from any screen, which gives them access to apps even quicker.

Android devices must be on the English local, running Jelly Bean or higher, and have the Google app version 3.5 or higher.

And now for the code…..

<activity android:name=”.SearchableActivity”>
<intent-filter>
<action android:name=”com.google.android.gms.actions.SEARCH_ACTION”/>
<category android:name=”android.intent.category.DEFAULT”/>
</intent-filter>
</activity>

source: Android Developers

Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post

Xiaomi takes 3rd place for world’s largest smartphone manufacturer

Next Post

Google Drive for Android gets improved search, share, and view tools