Map API

Nutiteq Maps Lib SDK enables developing advanced mobile mapping applications.
Platforms: Android, RIM BlackBerry, Java ME (J2ME)
Download maps API SDK »
Untitled Document

Products

» View demos
» Downloads

Uudised

Viimane: Tue, 17 May 2011 13:21:59
Teema: Nutimap Eesti kaardi asemele
Veel uudiseid »

AndroidGPSProvider - Emulator vs. Target

3 replies [Last post]
mcstenka
User offline. Last seen 1 year 26 weeks ago. Offline
Joined: 06/16/2010

I've been attempting to get the AndroidGPSProvider to display the current GPS position, using both the 1.0.2 and the beta 1.1.0a libraries, without any success on the Motorola Droid (v2.1).

After many attempts on the target hardware, I was able to get the 1.1.0a library to display the GPS location in the Android emulator (v2.1). I have not tried reverting back to the 1.0.2 library on the emulator, but I assume that would work as well.

On the target, I do notice that the GPS icon in the notification bar is active, but there never is any marker displayed on the map (like I do see using the emulator).

Is there anything different that needs to be done to get the AndroidGPSProvider to work on the target vs. the emulator?

mcstenka
User offline. Last seen 1 year 26 weeks ago. Offline
Joined: 06/16/2010

I think I figured out what was going on. Apparently I was not giving the GPS on my phone enough time to acquire the satellites. I finally took a long walk around the building and after several minutes, the AndroidGPSProvider started to track and display my GPS location.

jbaubort
User offline. Last seen 40 weeks 1 day ago. Offline
Joined: 07/09/2010

I have the same behavior, google map is able to give a rough position even inside building.

Nutiteq only supports GPS data for Android and apparantly not network provider (cellid, wifi).

So we have to implement this ourself (CellIdLocationProvider for example) . Or did I miss something ?

It would be nice to have one provider which choose the best provider to use (like cellid/wifi until gps is fine).

Thanks

jaak
User offline. Last seen 13 hours 16 min ago. Offline
Joined: 06/19/2008

Good question. Why Android Cellid is not yet implemented - I guess nobody has asked it yet.

Get latest beta from nutiteq.com/beta/lib and try following code (with OpencellId option):

 locationSource = new CellIdLocationProvider(new AndroidCellIdDataReader(activity), new OpenCellIdService("myapikey"),1000);
 gpsMarker = new NutiteqLocationMarker(new PlaceIcon(Utils.createImage("/res/drawable/gps_marker.png"), 5, 17),3000, true);

 locationSource.setLocationMarker(gpsMarker);
 mapComponent.setLocationSource(locationSource);

The main issue with CellID systems is to find good database to convert it to actual location. The good one is Google, but it has no public API, free ones like OpenCellID and Ericsson Labs Location API have much less content. Ericsson is usable for development only. Navizon and Skyhook have only commercial APIs.

Let me know if it works for you. Making this automatic would be next step, but we'd like to give developers more control whether on-line requests are done, and which cellid service to be preferred (as Nutiteq does not have one).

/JaakL