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. EVO AVA-FROYO + Sense U

Sebenernya sudah dari beberapa hari yang lalu, sedikit info dan
sekilas reviewnya, saya cuman pake sebentar karena sedang fokus ke
review stock ROM EVO sejak kemarin....

Detil bisa cek ke tekapeh -->
http://forum.xda-developers.com/showthread.php?t=720682

Review:
- Froyo oh yeah, segala kemampuan dari Froyo sudah pasti dimiliki
termasuk beberapa menu tambahannya
- Sense UI nya jalan, beneran jalan....
- EVDO, WIFI, BT, semuanya jalan....
- Basis Froyo diambil dari Desire, sehingga command untuk EPST tidak
jalan sama sekali
- PRL bisa berubah (saya coba 2 x, flash pertama berubah, flash kedua
gak berubah) jadi siap-siap pusing, update PRL nya jadi kudhu via CDMA
Workshop atau QPST
- setelan EVDO alhamdulillah ga berubah
- oh iya, kamera depannya beneran bisa dipake motret, kamera belakang
belum bisa

Mungkin Mas SA mau review lebih lanjut setelah puas pake damage ROM
nya.....saya juga mau coba lagi nanti setelah review EVO stock ROM
saya selesai.

-- 
"Indonesian Android Community [id-android]" 

2. How should I do this?

Hi--
 I'm trying to write a simple podcast application that allows a
show to have a branded application that people can use to listen to
the show, read show notes and even call a phone number if the show has
a voice mail box.
 Most everything is going great, I made some mistakes (like
implementing everything as asynctasks) and learned from them. I
re-implemented a majority of the background processing as a couple of
services.
 The problem I am currently faced with is that I have a
DownloadShowsService that downloads the MP3 and a PDF file and inserts
the MP3 into the contentstore. I want the Activity that starts the
service to update when the service is finished downloading the file.
 Currently I have this code:

Intent i = new Intent();
i.setAction(Intent.ACTION_RUN);
i.setClass(ShowDetail.this, DownloadShowsService.class);



i.putExtra(Constants.TITLE_FIELD, mShow.getTitle());
i.putExtra(Constants.ENCLOSURE_FIELD, mShow.getMp3Path());
i.putExtra(Constants.NOTES_URL, mShow.getPdfPath());
i.putExtra(BaseColumns._ID, mShow.getId());

bindService(i, mConnection, Context.BIND_AUTO_CREATE);
startService(i);
/* Make sure dssShow has been assigned to when we bind to it */
if(dssShow != null)

    {

      dssShow.addListener(new PropertyChangeListener(){

              public void propertyChange(PropertyChangeEvent event) {

                    if(event.getPropertyName() == "finished" &&
(Boolean)event.getOldValue() == true)
                    {
                           ShowDetail.this.readShowData();
                        }

              }
         });

}



The dssShow is always null immediately after the service starts.

So I am running against the limits of my knowledge of Android and
decided to ask for some help.

Does anyone have any suggestions?

Would seeing more code help?


I have to admit to being a bit confused by the whole SOA thing.

--Sean

Calendar: http://www.google.com/calendar/embed?src=darkmane%40gmail.com
Livejournal: http://darkmane.livejournal.com

Every 5 minutes you spend writing code in a new language is more
useful than 5 hours reading blog posts about how great the language
is.

-- 

3. NSPredicate-like functionality for Collections?

4. Selesai update f/w dan rooting gak bisa konek 3

5. Obfuscation

6. Fw: Wth miley jd error aneh

7. Resolving activities