Opened 11 years ago
Last modified 10 years ago
#911 new enhancement/feature request
Turning on GPRS/UMTS positioning if GPS does not work
Reported by: | me.yahoo.com/a/ydgsnam6qn3qn6qlyad5jaihuw--#6ef80 | Owned by: | cp15 |
---|---|---|---|
Priority: | minor | Milestone: | version 0.6.0 |
Component: | port/android | Version: | git master |
Severity: | Keywords: | GPS, GPRS/UMTS positioning, tunnel, building | |
Cc: |
Description
It should be great automatically switching to GPRS/UMTS positioning in tunnels where GPS does not work.
Looking into source code I found in NavitVehicle?.java: Once the GPRS positioning (preciseProvider) is working, GPRS/UMTS positioning (fastProvider) is turned off. A workaround might be turning on the fastProvider again, if GPS is manually disabled. This should be simple to implement.
Suggestion of implementation for the following method in https://navit.svn.sourceforge.net/svnroot/navit/trunk/navit/navit/android/src/org/navitproject/navit/NavitVehicle.java:
[...] private final LocationListener preciseLocationListener = new LocationListener() { [...] // Turning GPRS/UMTS positioning on again, if GPS is (manually) disabled. public void onProviderDisabled(String provider) { if (fastProvider == null) { // Selection criteria for the fast provider Criteria lowCriteria = new Criteria(); lowCriteria.setAccuracy(Criteria.ACCURACY_COARSE); lowCriteria.setAltitudeRequired(false); lowCriteria.setBearingRequired(false); lowCriteria.setCostAllowed(true); lowCriteria.setPowerRequirement(Criteria.POWER_HIGH); String tmpFastProvider = locationManager.getBestProvider(lowCriteria, false); if (tmpFastProvider!=null && preciseProvider.compareTo(tmpFastProvider) != 0) { fastProvider = tmpFastProvider; locationManager.requestLocationUpdates(fastProvider, 0, 0, fastLocationListener); } } } [...] }; [...]
Change History (1)
comment:1 Changed 10 years ago by usul
- Keywords tunnel building added
- Milestone set to version 0.6.0
- Priority changed from major to minor
Note: See
TracTickets for help on using
tickets.
This includes various tasks if it should be supported crossplattform:
Will take a lot of time, but maybe Android can be a first step. Anyway, will set it to the next release as a first step.