AndNav2 - Extended API Drucken
Geschrieben von: Nicolas Gramlich   
Montag, 22. Dezember 2008 um 19:02 Uhr
There are no translations available.

Hello Developers,

 the API you, as a developer, can interfere with AndNav2 has been extended. You can now make AndNav2 display a couple of GPS-locations along with a title and a description.

 This is what looks like having sent out some locations:

This is how it works:

 // Only AndNav2 will react!
public static final String ANDNAV2_VIEW_ACTION =

private void sampleLocationRequest() {
// Create a bundle that will transfer the location-information
final Bundle b = new Bundle();

final ArrayList locations = new ArrayList();
// Add as many locations as you want here

// "Latitude,Longitude;Title;Description"
locations.add("50.119539,8.658031;Frankfurt;City Center");
// "Latitude,Longitude;Title;Description"
locations.add("50.133089,8.66729;Frankfurt (title is optional);"
+ "Just an optional description.. put anything here =) !!");
// "Latitude,Longitude;Title"
locations.add("50.133089,8.63729;Just a title, no decription");
// "Latitude,Longitude"

// Add the locations to the bungle using "locations" as the key
b.putStringArrayList("locations", locations);

// Create and broadcast an Intent that will
// start an AndNav-Map with the locations marked

final Intent locationIntent = new Intent(ANDNAV2_VIEW_ACTION);

This will be available from the very next version of AndNav2!

We are open to any suggestion(s) Smile


Best Regards,

Zuletzt aktualisiert am Samstag, 27. Dezember 2008 um 20:38 Uhr