Yes, I did this.

I read in a book that geocoding doesn't work in AVD 7 and 8.  It said
to use AVD 6.

I'm going to try AVD 6 in a bit.



On Jul 3, 1:53 am, Ali Chousein <ali.chous...@gmail.com> wrote:
> Your code should work without problems. I use very similar code in my
> application and it just works.
>
> For Geocoder you need to set android.permission.INTERNET in your
> manifest file. Did you do this?
>
> ----------
> Ali Chousein
> Geo-Filtered Assistanthttp://geo-filtered-assistant.blogspot.com/
>
> On Jul 2, 6:53 pm, bob <b...@coolgroups.com> wrote:
>
>
>
>
>
>
>
> > I've been playing around with Geocoder stuff, and it is a nightmare.
> > Nothing works.
>
> > Is there any version of the emulator where this code does not give a
> > weird exception?
>
> > import java.io.IOException;
> > import java.util.List;
>
> > import android.app.Activity;
> > import android.location.Address;
> > import android.location.Geocoder;
> > import android.os.Bundle;
>
> > public class hmm extends Activity {
> >     /** Called when the activity is first created. */
> >     @Override
> >     public void onCreate(Bundle savedInstanceState) {
> >         super.onCreate(savedInstanceState);
> >         setContentView(R.layout.main);
> >         boolean ok=Geocoder.isPresent();
> >         final Geocoder geocoder = new Geocoder(this);
> >         final String locName = "1600 Amphitheatre Parkway, Mountain
> > View, CA";
> >         try {
> >                         final List<Address> list = 
> > geocoder.getFromLocationName(locName,
> > 1);
> >                 } catch (IOException e) {
> >                         // TODO Auto-generated catch block
> >                         e.printStackTrace();
> >                 }
>
> >     }
>
> > }

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to