andbook!.pdf - Learning Android Get an anddev.org - Android-Shirt Back to index
anddev.org Header Logo
FAQ Search Top rated articles Browse Feeds anddev.org - Authors Contact Details Register Log in

TrackBuilder for mock location providers

Goto page Previous  1, 2
 
       anddev.org - Android Development Community | Android Tutorials | Index -> Map Tutorials
Author Message
wannaberunner
Freshman


Joined: 03 Mar 2008
Posts: 2

PostPosted: Tue Mar 04, 2008 10:44 am    Post subject: Reply with quote

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. Smile

HTH,
Wannabe
Back to top
View user's profile Send private message
amos
Once Poster


Joined: 04 Mar 2008
Posts: 1

PostPosted: Tue Mar 04, 2008 11:31 am    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message
wmellon
Freshman


Joined: 03 Mar 2008
Posts: 3
Location: Rochester, NY

PostPosted: Fri Mar 07, 2008 7:08 am    Post subject: Reply with quote

wannaberunner; amos, I just wanted to thank you both again for your timely and helpful replies. Works great now!
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
zeeshan
Experienced Developer


Joined: 03 Mar 2008
Posts: 68

PostPosted: Wed Mar 12, 2008 2:09 pm    Post subject: Its a ver good tutorial Reply with quote

what is the purpose of Looper here? Looper.prepare()
Back to top
View user's profile Send private message
plusminus
Site Admin


Joined: 14 Nov 2007
Posts: 2102
Location: Germany

PostPosted: Wed Mar 12, 2008 4:35 pm    Post subject: Reply with quote

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. Confused

Regards,
plusminus

_________________

| Android Development Community / Tutorials
Back to top
View user's profile Send private message Send e-mail Visit poster's website
zeeshan
Experienced Developer


Joined: 03 Mar 2008
Posts: 68

PostPosted: Thu Mar 13, 2008 5:32 am    Post subject: Reply with quote

what i understand if i am not using handler then i must have to use looper ?
what actually looper does?
Back to top
View user's profile Send private message
nkho
Freshman


Joined: 29 Apr 2008
Posts: 6

PostPosted: Tue May 06, 2008 6:08 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
nkho
Freshman


Joined: 29 Apr 2008
Posts: 6

PostPosted: Tue May 06, 2008 10:03 am    Post subject: Reply with quote

Hi Wannabe,

Thanks Wannabe. It works Smile

Regards
Back to top
View user's profile Send private message
Display posts from previous:   
       anddev.org - Android Development Community | Android Tutorials | Index -> Map Tutorials All times are GMT + 1 Hour
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


© 2007, Android Development Community
All rights reserved.
Powered by phpBB.