March 28, 2024

Google extends “Ok, Google” hotword to third-party apps with six lines of code

0

google-now-ok-google

 

Google is extending the “Ok, Google” hotword search functionality to third-party apps. In a blogpost, the company announced that any developer can opt-in for this feature by adding six lines of code into their app. Inclusion of this feature into other apps would mean that you will no longer have to open a third party app to perform in-app searches.
Google Now’s “Ok, Google” hotword search is a powerful functionality. The feature lets users search for queries, set reminders, and interact with several other Google apps without opening them. However, until now, this feature didn’t work harmoniously with third-party apps.

To enable this feature, developers will have to make some changes to their app. Google says that 6 lines of code when put into the AndroidManifest.xml file of any app will enable the app’s interaction with Google Now, hence support for “Ok, Google” hotword search. For instance, you will be able to say “Ok, Google, search BookMyShow for movies running in CMR Central, Vizag”, and it will give you the results.

You can grab the code from the Android developers blog.