Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11235] Android: Ti.Geolocation.Android.locationProvider reports invalid value [x] found for minUpdateTime and minUpdateDistance

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-11-13T03:19:05.000+0000
Affected Version/sRelease 2.1.2
Fix Version/sRelease 3.1.0, 2012 Sprint 23 API, 2012 Sprint 23
ComponentsAndroid
Labelsmodule_geolocation, qe-testadded
ReporterAmuktha Akkinepally
AssigneePing Wang
Created2012-10-02T18:46:28.000+0000
Updated2013-01-07T02:46:43.000+0000

Description

When creating a location provider, the minUpdateTime and minUpdateDistance do not return an invalid value. No matter we remove the quotes or add .0 to pass it as a double value.

Steps to Reproduce:

1. load the app with the below location provider. 2. open the ddms 3. Filter the error messages with 'kroll'

Code:

gpsProvider = Ti.Geolocation.Android.createLocationProvider({
			name: Ti.Geolocation.PROVIDER_GPS,
		    minUpdateTime: '5.0', 
		    minUpdateDistance: '3.0'
	});

Error Log:

10-02 11:37:39.241: E/LocationProviderProxy(440): (KrollRuntimeThread) [192,1517] Invalid value [5.0] found for minUpdateTime, returning default
10-02 11:37:39.241: E/LocationProviderProxy(440): (KrollRuntimeThread) [1,1518] Invalid value [3.0] found for minUpdateDistance, returning default

Comments

  1. Ping Wang 2012-11-02

    PR https://github.com/appcelerator/titanium_mobile/pull/3373 Steps for FR: 1. Run the below app.js:
       var gpsProvider = Ti.Geolocation.Android.createLocationProvider({
       	name : Ti.Geolocation.PROVIDER_GPS,
       	minUpdateTime : '5.0',
       	minUpdateDistance : '3.0'
       });
       Ti.Geolocation.Android.addLocationProvider(gpsProvider);
       
       Ti.API.info("******************** minUpdateTime = " + gpsProvider.minUpdateTime);
       Ti.API.info("******************** minUpdateDistance = " + gpsProvider.minUpdateDistance); 
       
    2. Check the log. It should show:
       I/TiAPI   ( 7727):  ******************** minUpdateTime = 5
       I/TiAPI   ( 7727):  ******************** minUpdateDistance = 3
       
  2. Ping Wang 2012-12-26

    Created a subtask for back porting the PR.
  3. Satyam Sekhri 2013-01-06

    The values are accepted and no error is shown. Verified on: Titanium Studio: 3.0.1.201212181159 Titanium SDK: 3.1.0.v20130105233407 Android Device: LG P970 (v2.2), Samsung Galaxy Note (v2.3.6), Nexus 7 (v4.1)

JSON Source