[EMAIL PROTECTED] wrote:
> I want to launch map page in my application, so I create a intent as
> following:
> Intent i = new Intent();
> i.setAction(Intent.ACTION_WEB_SEARCH);
> i.setData(Uri.parse("http://maps.google.com/";);
> startActivity(i);
> 
> But I get an alert:
> 
> The application Browser (process com.android.browser) has stopped
> unexpectedly.
> Please try again.

If you want to launch the built-in map viewer, try:

String _lat=lat.getText().toString();
String _lon=lon.getText().toString();
Uri uri=Uri.parse("geo:"+_lat+","+_lon);

startActivity(new Intent(Intent.ACTION_VIEW, uri));

(this opens a map on the supplied location)

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com

Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to