
03 Nov GOOGLE’S SIX MAGIC LINES OF SEARCH CODE
Welcome to the Weekend Tech Round-up.
With just 6 lines of code in your AndroidManifest.xml file, Android’s on-device search opens and scours your applications for data.
The lines of code are:Move to Trash
<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>
For developers, this coding technique allows you to integrate power functionalities in a quick and easy way. It gives users a deeper interaction with the app. Your app can receive the SEARCH_ACTION intent containing the SearchManager.QUERY with the search expression once you have implemented the 6 lines of code.
For the rest of us, this means you can perform a simple voice activated search by saying something like “Search Foursquare for a rooftop bar ” and Foursquare will be opened and the search field filled with the data requested. Any user running Google 3.5 or higher on an Android Jelly Bean+ device will be able to use this functionality.
- WHAT THE CEO IS READING – IMPROVING THE BUSINESS-TO-BUSINESS CUSTOMER EXPERIENCE - March 26, 2016
- WHAT THE CEO IS READING – LEADING AND GOVERNING THE CUSTOMER-CENTRIC ORGANIZATION - March 22, 2016
- WHAT THE CEO IS READING – MANAGE YOUR EMOTIONAL CULTURE - February 23, 2016
- WHAT THE CEO IS READING – GETTING TO SI, JA, OUI, HAI, AND DA - December 9, 2015
- 2 นาทีข่าวเทคโนโลยีประจำเดือนกันยายน - October 2, 2015
- 2 Minutes Of Tech. September’s News in 2 Minutes. - October 2, 2015
- PRINT YOUR OWN CROSSGUARD LIGHTSABER - September 22, 2015
- WHAT THE CEO IS READING – FOUR SEASONS: THE STORY OF A BUSINESS PHILOSOPHY - September 17, 2015
- 2 นาทีข่าวเทคโนโลยีประจำเดือนสิงหาคม - September 2, 2015
- 2 Minutes Of Tech. August’s News in 2 Minutes. - September 2, 2015