change the default GPS location of emulator

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

change the default GPS location of emulator

Postby yorgosg » Wed Jan 30, 2008 11:07 am

I changed the location file of the emulator under /data/misc/location/gps to:

gps,1193789209,39.04,21.11,0,0,0

in order to display as default the lat 39.04 and long 21.11

However, the emulator still displays 37.45 and -122.1 as default. Any ideas?

Cheers!
yorgosg
Developer
Developer
 
Posts: 35
Joined: Wed Jan 30, 2008 9:53 am

Top

Postby plusminus » Wed Jan 30, 2008 11:11 am

Hello yorsog,

we have a :src: Track-Builder for Mock-Location-Providers on the board.

Plus also a Mock LocationProvider - Structure/Explanation-Tutorial about the NMEA-Protocol and the $GPRMC-sentence.

Hope this helps you further.

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 yorgosg » Wed Jan 30, 2008 12:06 pm

Cheers for the fast response!!

I actually read those two threads, but they explain about the syntax of the nmea file, not the gps location...

Has anyone altered with success the default location of the emulator?

"gps,1193789209,37.i42238833333,-122.0965333333,0,0,0" is the default file the emulator has.

I suppose the second and third parameters are lat and long. However, if so, I don't understand what the "i" is in the 37.i42238833333...isn't it supposed to be a number?

Also, in the "Track-Builder for Mock-Location-Providers" tutorial you state that one has to create a folder, like the test1 folder you created. Do I have to do this, or can I just replace the location file under gps?

What I do in the code is:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2.         LocationManager locationManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
  3.  
  4.         Location location = locationManager.getCurrentLocation("gps");
  5.  
  6.        
  7.  
  8.         TextView tv = new TextView(this);
  9.  
  10.         tv.setText("Current location is: lat: " + location.getLatitude() + " long: " + location.getLongitude());
Parsed in 0.032 seconds, using GeSHi 1.0.8.4


You see that I use "gps". If I create a test1 folder would I need to use "test1" instead??? Does this make any sense?

Please let me know, I am sure many people are trying to find info on the same thing...

Thanks very much, any help is highly appreciated!!!
yorgosg
Developer
Developer
 
Posts: 35
Joined: Wed Jan 30, 2008 9:53 am

Top

Return to Map Problems

Who is online

Users browsing this forum: Google [Bot] and 4 guests