TrackBuilder for mock location providers

Tutorials that use the MapActivity. Many using GPS functionality.

Postby wannaberunner » Tue Mar 04, 2008 10:44 am

Hi Will,

what I did is that I "pulled" the properties file from the /data/misc/location/gps to my computer and then I "pushed" it to /data/misc/location/test1.

Before that, during booting the emulator was saying there was just gps LocationProvider and after I put properties file, it started recognizing new LocationProvider, test1.

It seems to me that the thing which initializes LocationProviders actually looks for a property file in that location and if it finds it, it will name the provider like the directory is called. But, this is just my hunch, and only android team, or a decompiler can tell the truth. :)

HTH,
Wannabe
wannaberunner
Freshman
Freshman
 
Posts: 3
Joined: Mon Mar 03, 2008 4:46 pm

Top

Postby amos » Tue Mar 04, 2008 11:31 am

wmellon wrote:wannabe,

Could you be please be more specific about how you "copied the properties file from the default Gps provider?" I'm not sure what this means, or perhaps more importantly, why it worked.

--Will


Hi wmellon,

The google android website has information on Location Services and their usage, it also explains how to create mock location providers, which is what this very useful (thnx jeremain!) does for us automatically. Check out the details at http://code.google.com/android/toolbox/apis/lbs.html
It doesn't mention that a properties file is required - so many thanks to wannabe for finding out the problem and saving us a whole lot of trouble.

Copying the properties file solved the problem for me, although I had to restart the emulator for it to take effect.

To browse the android phone's file system, you need to run "adb shell" which starts a unix shell of the phone's file system. copying files from your computer's file system to the phone's file system and vice versa is done using "adb push" and "adb pull" respectively.

I assume you're developing with Eclipse, so you can use the DDMS perspective, which has a graphical file browser for the phone and lets you pull and push files. You can explore the phone's file system conveniently from there.


Good luck!
amos
Once Poster
Once Poster
 
Posts: 1
Joined: Tue Mar 04, 2008 11:11 am

Postby wmellon » Fri Mar 07, 2008 7:08 am

wannaberunner; amos, I just wanted to thank you both again for your timely and helpful replies. Works great now!
wmellon
Freshman
Freshman
 
Posts: 3
Joined: Mon Mar 03, 2008 4:39 am
Location: Rochester, NY

Its a ver good tutorial

Postby zeeshan » Wed Mar 12, 2008 2:09 pm

what is the purpose of Looper here? Looper.prepare()
zeeshan
Experienced Developer
Experienced Developer
 
Posts: 68
Joined: Mon Mar 03, 2008 6:10 am

Postby plusminus » Wed Mar 12, 2008 4:35 pm

Hello zeeshan,

I'm not sure (long ago since I had that)...
Its somehow is a problem with handling with views inside a Thread... and not using a handler. :?

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 zeeshan » Thu Mar 13, 2008 5:32 am

what i understand if i am not using handler then i must have to use looper ?
what actually looper does?
zeeshan
Experienced Developer
Experienced Developer
 
Posts: 68
Joined: Mon Mar 03, 2008 6:10 am

Top

Postby nkho » Tue May 06, 2008 6:08 am

Hi Wannabe,

I am also having the same problem. but i tried to follow your way, however i keep on pulling the file from the /data/misc/location/gps to my computer and it keeps prompt me error saying that copying of remote directory not supported (yet). Or maybe can you write the command how you actually pull the file from device?

Thanks

Regards
nkho
Freshman
Freshman
 
Posts: 6
Joined: Tue Apr 29, 2008 4:51 am

Postby nkho » Tue May 06, 2008 10:03 am

Hi Wannabe,

Thanks Wannabe. It works :)

Regards
nkho
Freshman
Freshman
 
Posts: 6
Joined: Tue Apr 29, 2008 4:51 am

Postby wouter88 » Sun Mar 22, 2009 4:39 pm

Hey,

Can you update this project to the latest SDK 1.1 please!
I got a lot of errors and missing classes when I want to create this project!

Thank you
wouter88
Freshman
Freshman
 
Posts: 2
Joined: Sun Mar 22, 2009 4:34 pm
Location: Overijse

To bump or not to bump

Postby rd42 » Thu May 06, 2010 6:40 pm

This looks great, is it still from 2008 though?

Thanks for sharing, I'm gonna download it anyway and try it out because it's exactly what I'm trying to learn.

rd42
User avatar
rd42
Junior Developer
Junior Developer
 
Posts: 22
Joined: Thu Apr 01, 2010 5:12 pm

Top
Previous

Return to Map Tutorials

Who is online

Users browsing this forum: No registered users and 4 guests