[TinyTut] - Starting the Maps-Activity with an Intent
What you learn: You will learn how easy it is, to start the Maps-Activity with a passeg "geo"-URI in just two lines(or one if you want to
).Difficulty: 0 of 5
Description
The following Code sends an Intent to the OS, which will start the registered Map-Activity with the passed "geo"-URI.
In this case it is the White-House.
Using java Syntax Highlighting
- try {
- final Intent myIntent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse("geo:38.899533,-77.036476"));
- startActivity(myIntent);
- } catch (URISyntaxException e) { }
Parsed in 0.029 seconds, using GeSHi 1.0.8.4
Regards,
plusminus






