skmaps - SKobbler location accuracy in android -


i implementing custom turn-by-turn navigation using skmaps. getting gps location using gpsprovider(skcurrentpositionprovider --> gpsprovider enabled).

the location provider gives accurate location when device connected in wifi. if switch network 3g (turn off wifi), location provider produces wrong location results.

how overcome issue? please provide suggestions overcome issue.

private void setgpsproviders() {     currentpositionprovider = new skcurrentpositionprovider(activity);     currentpositionprovider.setcurrentpositionlistener(activity);      if (sknavigationutils.hasgpsmodule(activity)) {         currentpositionprovider.requestlocationupdates(true, false, true); //usegpsprovider, usenetworkprovider, usepassiveprovider     } else if (sknavigationutils.hasnetworkmodule(activity)) {         currentpositionprovider.requestlocationupdates(false, true, true);     } } 

all right, mobile network gives low accuracy of coordinates (from few hundred meters several kilometers), while accuracy wifi has several tens of meters. make sure have turned on gps in phone. can done in code:

//import android.location.locationmanager;     public static boolean isgpsenabled (context context) {              locationmanager manager = (locationmanager) context.getsystemservice (context.location_service);              return manager.isproviderenabled (locationmanager.gps_provider);           } 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -