AndNav! - Android Map-Routing-System!

Search for BETA-testers and/or promote your own Application in a decent way.

What's the route generate alogrithm you use.

Postby windkiosk » Fri Mar 07, 2008 2:46 am

Hi man:
Actually, i'm migrating a navigation product to Android platform for a compony.

My interesting is that what's the alogrithm you use to request route. You know, there are some guys in my compony who major in this function.

Thanks. BTW, your image rotate example help me a lot.
windkiosk
Freshman
Freshman
 
Posts: 5
Joined: Fri Mar 07, 2008 2:03 am

Top

Postby plusminus » Fri Mar 07, 2008 2:52 pm

Hello windkiosk,

have a look at this tutorial:
:arrow: Google Driving Directions - MapOverlayed.

May I know what company is bringing Navigation to Android-Devices :?:

Regards,
plusminus
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 windkiosk » Sat Mar 08, 2008 8:21 am

Got it.

I will study later.

Thanks ~~~
windkiosk
Freshman
Freshman
 
Posts: 5
Joined: Fri Mar 07, 2008 2:03 am

how to have a permanent zoom box on a map

Postby rahul_mawkins » Mon Mar 10, 2008 10:25 am

When we display a mapview and slide our fingures on it zoom view comes up
What if I want this to be permamnently placed on right hand corner of my screen
or may on top of my screen horizontaly
mv.displayZoomDialog(10,10);
doesnt really work...though it shows the box for a sec and then whole mapview takes over
rahul_mawkins
Developer
Developer
 
Posts: 34
Joined: Wed Feb 27, 2008 4:09 am

Postby bavarol » Thu Mar 13, 2008 4:06 pm

Hi plusminus, I can't do it, I don't know how I can show the red line, please let me now this little piece of code, perhaps I make a mistake in with the Path Class, Paint or something more. I'll get mad :(

By the way, you have moved the other posts and you called the new theme "DrivingDirection: get Path already driven" but I don't use DrivingDirection Class as I said you but I'm a pedestrian and route is gone only a time.

Regards
bavarol
Experienced Developer
Experienced Developer
 
Posts: 52
Joined: Mon Dec 10, 2007 9:19 pm

Postby simegi » Thu Mar 13, 2008 9:38 pm

Hi, I'm a new anddev user.

This is a post verify :D
simegi
Freshman
Freshman
 
Posts: 3
Joined: Wed Mar 12, 2008 9:12 pm
Location: Italy

Top

Postby simegi » Thu Mar 13, 2008 9:52 pm

Hi plusminus, I have a problem with a Progress Dialog in a MapActivity. The dialog is displayed but
when I invoke dismiss() method the following error occur:

Image

The source code of the ProgressDialog is:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. progressDialog = ProgressDialog.show(getActivityContext(),"Searching Path",
  2.                                                 "Please wait while searching...", false,false);
  3.                                 threadDialog = new Thread(new Runnable() {
  4.                                         public void run() {
  5.                                                 progressDialog.dismiss();
  6.                                         }
  7.                         });
  8. startFetchDirections(start_point,"",end_point,"");
  9.  
Parsed in 0.032 seconds, using GeSHi 1.0.8.4


Then, in startFetchDirections method, after that directions have been determinated the
threadDialog thread is launched with threadDialog.start(); as follow:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. private void startFetchDirections(MapPoint from_pos, String from_name,
  2.                         MapPoint to_pos, String to_name) {
  3.                
  4.                 /* mDD is a class variable for the activity that will
  5.                  * hold an instance of the DrivingDirection object created here. */
  6.                 myDD = new DrivingDirection(from_pos, from_name, to_pos, to_name);
  7.                 if (myDD != null) {
  8.                         /* Add the request the dispatcher */
  9.                         getDispatcher().addDataRequest(myDD);
  10.  
  11.                         t = new Thread(new Runnable() {
  12.                                 public void run() {
  13.                                        
  14.                                         /*
  15.                                          * Wait for the search to be complete...
  16.                                          * or after 30 seconds search is interrupted
  17.                                          */
  18.                                         int elapsedTime = 0;
  19.                                         while (!myDD.isComplete() && elapsedTime < 300) {
  20.                                                
  21.                                                 try {
  22.                                                         synchronized (waitObject){
  23.                                                           waitObject.wait(100);
  24.                                                           elapsedTime++;
  25.                                                         }              
  26.                                                 }
  27.                                                 catch (InterruptedException e) {
  28.                                                         Log.e("DEBUGTAG", "'!myDD.isComplete()' was interrupted.",e);
  29.                                                 }
  30.                                         }
  31.                                         /* Check to see if any Placemarks were found..
  32.                                          * if 0 then there is no route! */
  33.                                         turns = myDD.getTurnPoints();
  34.                                         if (turns != null) {
  35.                                                 /* Set a flag to let the program know
  36.                                                  * the directions are done... */
  37.                                                 foundDirections = true;
  38.                                                 goToTurn(0);
  39.                                         }
  40.                                         else{/* no route.. */
  41.                                                 foundDirections = false;
  42.                                                 myDD = null;
  43.                                                 /* Let the user know that no route was found... */
  44.                                                
  45.                                         }
  46.                                         synchronized (waitObject){
  47.                                           threadDialog.start();
  48.                                           waitObject.notifyAll();
  49.                                         }
  50.                                 }
  51.                         });
  52.                        
  53.                         waitObject = new Object();
  54.                        
  55.                         try {    
  56.                          synchronized (waitObject) {     
  57.                                  t.start();
  58.                                  waitObject.wait();
  59.                          }
  60.                         }
  61.                         catch (InterruptedException e) {e.printStackTrace();}
  62.                 }
  63.         }
  64.  
Parsed in 0.036 seconds, using GeSHi 1.0.8.4


Can you hel me ?
Thanks in advance
simegi
Freshman
Freshman
 
Posts: 3
Joined: Wed Mar 12, 2008 9:12 pm
Location: Italy

Postby simegi » Tue Mar 18, 2008 11:41 am

simegi wrote:Hi plusminus, I have a problem with a Progress Dialog in a MapActivity. The dialog is displayed but
when I invoke dismiss() method the following error occur:

android.policy.PhoneWindow$DecorView@401d2ab0 must be attached to a window

The source code of the ProgressDialog is:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. progressDialog = ProgressDialog.show(getActivityContext(),"Searching Path",
  2.                                                 "Please wait while searching...", false,false);
  3.                                 threadDialog = new Thread(new Runnable() {
  4.                                         public void run() {
  5.                                                 progressDialog.dismiss();
  6.                                         }
  7.                         });
  8. startFetchDirections(start_point,"",end_point,"");
  9.  
Parsed in 0.035 seconds, using GeSHi 1.0.8.4


Then, in startFetchDirections method, after that directions have been determinated the
threadDialog thread is launched with threadDialog.start(); as follow:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. private void startFetchDirections(MapPoint from_pos, String from_name,
  2.                         MapPoint to_pos, String to_name) {
  3.                
  4.                 /* mDD is a class variable for the activity that will
  5.                  * hold an instance of the DrivingDirection object created here. */
  6.                 myDD = new DrivingDirection(from_pos, from_name, to_pos, to_name);
  7.                 if (myDD != null) {
  8.                         /* Add the request the dispatcher */
  9.                         getDispatcher().addDataRequest(myDD);
  10.  
  11.                         t = new Thread(new Runnable() {
  12.                                 public void run() {
  13.                                        
  14.                                         /*
  15.                                          * Wait for the search to be complete...
  16.                                          * or after 30 seconds search is interrupted
  17.                                          */
  18.                                         int elapsedTime = 0;
  19.                                         while (!myDD.isComplete() && elapsedTime < 300) {
  20.                                                
  21.                                                 try {
  22.                                                         synchronized (waitObject){
  23.                                                           waitObject.wait(100);
  24.                                                           elapsedTime++;
  25.                                                         }              
  26.                                                 }
  27.                                                 catch (InterruptedException e) {
  28.                                                         Log.e("DEBUGTAG", "'!myDD.isComplete()' was interrupted.",e);
  29.                                                 }
  30.                                         }
  31.                                         /* Check to see if any Placemarks were found..
  32.                                          * if 0 then there is no route! */
  33.                                         turns = myDD.getTurnPoints();
  34.                                         if (turns != null) {
  35.                                                 /* Set a flag to let the program know
  36.                                                  * the directions are done... */
  37.                                                 foundDirections = true;
  38.                                                 goToTurn(0);
  39.                                         }
  40.                                         else{/* no route.. */
  41.                                                 foundDirections = false;
  42.                                                 myDD = null;
  43.                                                 /* Let the user know that no route was found... */
  44.                                                
  45.                                         }
  46.                                         synchronized (waitObject){
  47.                                           threadDialog.start();
  48.                                           waitObject.notifyAll();
  49.                                         }
  50.                                 }
  51.                         });
  52.                        
  53.                         waitObject = new Object();
  54.                        
  55.                         try {    
  56.                          synchronized (waitObject) {     
  57.                                  t.start();
  58.                                  waitObject.wait();
  59.                          }
  60.                         }
  61.                         catch (InterruptedException e) {e.printStackTrace();}
  62.                 }
  63.         }
  64.  
Parsed in 0.040 seconds, using GeSHi 1.0.8.4


Can you hel me ?
Thanks in advance
simegi
Freshman
Freshman
 
Posts: 3
Joined: Wed Mar 12, 2008 9:12 pm
Location: Italy

Postby kadair » Sun Mar 23, 2008 7:31 am

Hi plusminus,

I'm trying to figure out how to rotate a BitMap overlay which represents my current location on a map. I have an arrow fairly similar to yours and I'm trying to get it pointing in the direction I'm headed -- I'm using the bearings from my current location. Everything I've read seems to imply that I should rotate the canvas and not the image. When I try this though my arrow eventually ends up off the map.

If anyone can help me with this I would be greatly appreciative.

Thanks! :D

Ken
"Your imagination is your preview of life's coming attractions." - Einstein

http://www.AppSocial.com
kadair
Junior Developer
Junior Developer
 
Posts: 17
Joined: Sun Dec 16, 2007 11:02 pm
Location: Cincinnati OH, United States

Nevermind...

Postby kadair » Sun Mar 23, 2008 7:44 am

Thanks to this other thread...

resize_and_rotate_image_-_example-t621.html

I was able to get it working. :D
"Your imagination is your preview of life's coming attractions." - Einstein

http://www.AppSocial.com
kadair
Junior Developer
Junior Developer
 
Posts: 17
Joined: Sun Dec 16, 2007 11:02 pm
Location: Cincinnati OH, United States

integrate andnav

Postby flowdi » Sun Apr 06, 2008 12:29 pm

Hi plusminus,

this looks realy nice!
are you planning to provide ways for other applications to integrate with andnav?
provide custom intent actions
or register as intent-receiver for VIEW_ACTION and location-content-type...

e.g. geo-url in a website / email / feed ...
click on it and directly jump into andnav
(new Intent(NAVIGATE_THERE_ACTION, Uri.parse("geo://342543423,238737823"))

regards
flo
User avatar
flowdi
Junior Developer
Junior Developer
 
Posts: 11
Joined: Sun Nov 25, 2007 6:39 pm

Re: integrate andnav

Postby plusminus » Mon Apr 07, 2008 6:36 pm

Hey flowdi,

really good point.
Imo there is not yet an Action defined for that porpose.

:idea: Btw: Test the current AndNav-Version...
:arrow: http://www.trackdroid.com/info/nicolas- ... 3-2-a-0023

FYI this is just a demo which is using the mock gps provider.

As I'm pretty fed up with the DrivingDirections provided by Google, I'm doing it myself now.
(Digging deeper there were pretty much problems)

Regards,
plusminus
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 Bruce.lntu » Mon Apr 14, 2008 9:17 am

Hi plusminus,

when adb the "AndNav_20080412_v0[1].4.1_alpha.apk",it shows an error, the picture here


can you tell out what's the matter.

Regards
Bruce
Attachments
andnav error2.png
andnav error2.png (66.94 KiB) Viewed 5992 times
Last edited by Bruce.lntu on Fri Apr 25, 2008 3:49 am, edited 1 time in total.
User avatar
Bruce.lntu
Developer
Developer
 
Posts: 37
Joined: Thu Jan 03, 2008 11:36 am

Postby plusminus » Mon Apr 14, 2008 10:37 pm

Hello Bruce,

it happened right when you clicked on "Quickstart..." ?

I'll release the version I am submitting to ADC very soon.... :shock:

Regards,
plusminus
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 plusminus » Tue Apr 15, 2008 1:00 am

So there it is :)

0.5.0 - Official ADC version :cool:

DL: :arrow: http://www.trackdroid.com/info/nicolas-gramlich/andnav

New Features:
  • Via Routes
  • Heavily improved Streetname-Autocompletion
  • Easier and better looking navigation through the "Search-Destination"-Process
  • Display-Quality-Modes (Low, Standard, High, Uber)
  • Multilingual Driving-Directions (all languages that came to my mind ^^. Basically all languages that GoogleMaps is avaibale on, are possible)
  • Stability :!: ;)
Interface AndNav from your own application with code like this:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.         Intent navTo = new Intent("org.anddev.andnav.intent.action.NAV_TO");
  2.        
  3.         Bundle b = new Bundle();
  4.         b.putString("to", "37.465259,-122.126456");
  5.         navTo.putExtras(b);
  6.        
  7.         broadcastIntent(navTo);
Parsed in 0.035 seconds, using GeSHi 1.0.8.4


Any feedback is welcome :)

Regards,
plusminus
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
PreviousNext

Return to Promote your Android Application

Who is online

Users browsing this forum: Google [Bot] and 1 guest