Official way to search for nearby businesses?

by Lance Nanek » Fri, 04 Sep 2009 02:47:58 GMT


Sponsored Links
 Does anyone know the proper way to search for nearby businesses in
your own application? I'll cover several things I've tried below, but
they either don't work or require a lot of extra code.

GeoCoder#getFromLocationName works for specific place queries like
"white house". It returns nothing for something like "restaurant near
boston", however. I tested on both my T-Mobile G1 and in the 1.5_r3
SDK emulator. The blog specifically says it can be used to "search for
businesses", however:
 http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html 

There is a related issue in the tracker, but it's been marked released
with no comment:
 http://code.google.com/p/android/issues/detail?id=1537 

Giving up on GeoCoder, sending an ACTION_VIEW Intent with a  "geo:0,0?
q=restaurant+near+boston" URI works great for the built in Maps
application, but sending it to my own subclass of MapActivity just
shows the default map you see when starting it normally.

Using an HttpURLConnection to " http://maps.google.com/?q=restaurant 
+near+boston&output=kml" would get me the data, but then requires
writing a KML parser and calculating distances on my own.

Anyone have any advice?

Thanks,
Lance Nanek
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Streaming RTSP using MediaPlayer: possible from the emulator?



Is this still the case?

Thank you,

Chris

-- 

2. Getting the application icon to show in the launcher

I created a simple app with a single activity and a 64X64 pixel png
icon. But I'm seeing the default Android icon instead of my drawable.
The icon is in res/drawable/icon.png and the manifest is as shown. I
also tried adding an icon attribute to the activity but that didn't
change - it's still just showing the default icon in the launcher. Any
idea what I might be doing wrong?

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.speakez"
      android:versionCode="1"
      android:versionName="1.0">
    <application android:icon="@drawable/icon" android:label="@string/
app_name" android:debuggable="true">
        <activity android:name=".MainActivity" android:label="@string/
app_name"  >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

    </application>
    <uses-sdk android:minSdkVersion="8" />

<uses-permission android:name="android.permission.CALL_PHONE"></uses-
permission>
</manifest>

-- 

3. Custom KML - This Community Map could not be displayed....

4. TextView borders when contained in a tablerow?

5. Strange native leak - OutOfMemory after language change.

6. HTTPS POST (SSL) with Multipart - HTTPURLConnection or HTTPClient(Apache library)

7. Implementing a RightMarginSpan/EndingMarginSpan in a TextView