Intents List: Invoking Yellowbook Mobile Application Intents on Android Devices
The table below lists intents exposed by the Yellowbook application that your application can access on Android devices.
Android Intents
The following intents access Yellowbook's mobile search application and are available for Android applications.
| Intent | Code Snippet | Details | Result | App Image |
|---|---|---|---|---|
| Search_WhatCurrentLocation |
Intent i = new Intent();
i.setClassName("com.yellowbook.android2",
"com.yellowbook.android2.AndroidSearch");
i.setAction(android.content.Intent.ACTION_WEB_SEARCH);
i.putExtra(SearchManager.QUERY, "pizza");
startActivity(i);
|
Search for "What" products, services, and businesses (see "What" search box on App Image) within the user's Current Location. Define "What". For example, defined as "pizza" in the code snippet. "Where" attribute does not need to be defined, this is handled through Lat/Long coordinates identified via device's GPS/geo location services. Do not pass URL encoded values, can result in error. |
Opens the Yellowbook search application homepage with the "What" box populated and "Where" box populated with Current Location. Click Search to execute the search and view results. |
|
| Search_WhatWhere (By String) |
Intent i = new Intent();
i.setClassName("com.yellowbook.android2",
"com.yellowbook.android2.AndroidSearch");
i.putExtra("What", "flower");
i.putExtra("Where", "boston");
startActivity(i);
|
Search for "What" products, services, and businesses (see "What" search box on App Image) within a specified location. Define "What". For example, defined as "flower" in the code snippet. Define "Where" as city, state, or zip code. Do not pass URL encoded values, can result in error. |
Opens the Yellowbook search application homepage with the "What" and "Where" boxes populated. Click Search to execute the search and view results. To execute this search without clicking the Search button, see Search_WhatWhere (by URI). |
|
| Search_WhatWhere (by URI) |
Intent i = new Intent();
i.setClassName("com.yellowbook.android2",
"com.yellowbook.android2.AndroidSearch");
i.setAction(Intent.ACTION_SEARCH);
i.setData(Uri.parse(
"yellowbook://?what=pizza&where=boston"));
startActivity(i);
|
View search results for "What" products, services, and businesses within a specified location. Define "What". For example, defined as "pizza" in the code snippet. Define "Where" as city, state, or zip code. For example, defined as "boston" in the code snippet. Do not pass URL encoded values, can result in error. |
Initially opens the Yellowbook search application homepage with the "What" and "Where" boxes populated. The search is then automatically executed and the search results appear without clicking Search from the homepage. |
|
For more information about Android intents, please refer to the Android Intents and Intent Filters page.
