Interfacing with AndNav2

Supervised News & Rumors concerning the Google Android Platform.

Interfacing with AndNav2

Postby plusminus » Wed Nov 26, 2008 2:47 am

Hello Developers,

do you need Navigation in your app :?: Its never been so easy :!:

With this tiny example you can make any application use the full navigation capabilities of AndNav2 and or AndNav1. This API can be useful for any application, especially all kinds of Piggyback- or FriendFinder-Applications!

This is how you do it. Nothing more, nothing less:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.     // Both(!) AndNav1 and AndNav2 will react!
  2.  
  3.     public static final String ANDNAV_NAV_ACTION = "org.andnav.intent.ACTION_NAV_TO";
  4.  
  5.  
  6.  
  7.     // Only AndNav2 will react!
  8.  
  9.     public static final String ANDNAV2_NAV_ACTION = "org.andnav2.intent.ACTION_NAV_TO";
  10.  
  11.    
  12.  
  13.     private void sampleNavRequest() {
  14.  
  15.         final Intent navTo = new Intent(ANDNAV2_NAV_ACTION);
  16.  
  17.  
  18.  
  19.         // Create a bundle that will transfer the routing-information
  20.  
  21.        final Bundle b = new Bundle();
  22.  
  23.        
  24.  
  25.         final ArrayList<String> vias = new ArrayList<String>();
  26.  
  27.         vias.add("50.119539,8.658031"); // "Latitude,Longitude"
  28.  
  29.         // Add as many waypoints as you want here
  30.  
  31.        
  32.  
  33.         b.putString("to", "50.133089,8.66729"); // "Latitude,Longitude"
  34.  
  35.         b.putStringArrayList("via", vias);
  36.  
  37.        
  38.  
  39.         navTo.putExtras(b);
  40.  
  41.  
  42.  
  43.         sendBroadcast(navTo);
  44.  
  45.     }
Parsed in 0.034 seconds, using GeSHi 1.0.8.4


:arrow: Go andnav.org for details and the API-Talk :!:

/plusminus for anddev.org
Last edited by plusminus on Sat Jun 20, 2009 7:51 am, edited 1 time in total.
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Top

Postby Bruce.lntu » Wed Nov 26, 2008 6:01 am

This will be so excited :!:
User avatar
Bruce.lntu
Developer
Developer
 
Posts: 37
Joined: Thu Jan 03, 2008 11:36 am

Postby MrSnowflake » Wed Nov 26, 2008 11:40 am

Awsome!
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Pricing?

Postby GodsMoon » Fri Dec 12, 2008 5:48 pm

plusminus,
I'm considering using one of your AndNav apps, but I'm curious about the pricing. I would like to offer my users a free mapping option. Will AndNav1 be free? Or will you have a free version of either of them?

Thanks,
David
Making Disc Golf Social:
www.goldfishview.com
GodsMoon
Developer
Developer
 
Posts: 26
Joined: Mon Dec 10, 2007 5:13 pm

Postby plusminus » Sun Dec 14, 2008 7:37 am

Hi David,

we are trying to make AndNav1 and AndNav2 free - supported by ads.
No guarantee on that, but free its what we would love to see AndNav in the end :)

If you have wishes for a API-function, let me know.

Best Regards,
Nicolas
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby GodsMoon » Sun Dec 14, 2008 11:16 pm

Thanks for the info. I'll keep you in mind. Keep us posted on your website.
Making Disc Golf Social:
www.goldfishview.com
GodsMoon
Developer
Developer
 
Posts: 26
Joined: Mon Dec 10, 2007 5:13 pm

Top

Google Developer conference.....

Postby apple2183 » Fri Apr 10, 2009 2:32 pm

apple2183
Junior Developer
Junior Developer
 
Posts: 23
Joined: Fri Apr 10, 2009 2:07 pm

Postby fritzzz » Sat Jun 06, 2009 10:10 pm

there is some offline vav? I want all maps of my city!!!
fritzzz
Freshman
Freshman
 
Posts: 4
Joined: Sat Jun 06, 2009 10:00 pm

Just for fun

Postby p6majo » Thu Sep 10, 2009 8:43 pm

Hi Plusminus,

I love cycling on a roadbike long distances on roads with little traffic.
So far I had a GPS mouse and a PDA with TomTom software to tell me where to go on these trips.

Now I have this awesome G1 and discovered great tools like andNav2.
There is only a tiny complaint: Why is it not possible to enter or load a route consisting of 10 to 20 waypoints?
So far, I only discovered the possibility to be navigated from A to B.

On the other hand I just read that I can use andNav2 as an API with the option "via" (getting routes determined by waypoints it seems, doesn't it?

I also downloaded your openSource OpenStreetViewer.
What would be the easiest way to get this API incorporated to show a route on the map that moves in real-time with location changes?

Thanks for your help and thanks for this great piece of work,
Johannes.
p6majo
Freshman
Freshman
 
Posts: 3
Joined: Thu Sep 10, 2009 7:29 pm

Postby p6majo » Thu Sep 10, 2009 9:03 pm

I posted my question too quickly. Your few lines of sample code were sufficient to save my trip on this weekend.
I thought that there were hours of writing code and debugging ahead of me, instead it was just a matter of a few minutes. The longest time it took me to enter all the way points.

Do you think it might be useful to write a little route converter application turning TomTom routes or routes created with Google maps into routes that can be used with your andNav2 application? Even I could do this:-)

Vielen Dank,
Johannes.
p6majo
Freshman
Freshman
 
Posts: 3
Joined: Thu Sep 10, 2009 7:29 pm

Top

Return to News & Rumors

Who is online

Users browsing this forum: No registered users and 3 guests