Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2634] Android: Geolocation crash after changing internet connection type using Wi-fi button on expanded status bar.

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-04-08T18:58:55.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsandroid, crash, defect, triage
ReporterMaciej Czerwinski
AssigneeMauro Parra-Miranda
Created2012-10-27T21:00:18.000+0000
Updated2016-03-08T07:41:43.000+0000

Description

Hi probably it's a specific bug in Titanium mobile application. (I have Andorid 2.3.6 and Titanium SDK 2.1.3) I have a simple application, it starts only geolocation listener and shows Hello World label in the middle of the screen.
var win = Ti.UI.createWindow({
		backgroundColor:'#ffffff',
		navBarHidden:true,
		exitOnClose:true
	});
var view = Ti.UI.createView();
var label = Ti.UI.createLabel({
	text:String.format(L('welcome'),'Titanium'),
	height:'auto',
	width:'auto'
});

view.add(label);
win.add(view);
var update_location = function(rs){
	Ti.API.info('Has coords')
}

win.open();


Titanium.Geolocation.accuracy = Titanium.Geolocation.ACCURACY_BEST;
Titanium.Geolocation.frequency = 0;
Titanium.Geolocation.preferredProvider = Titanium.Geolocation.PROVIDER_GPS;
Titanium.Geolocation.purpose = "GPS Run-log.com";
Titanium.Geolocation.distanceFilter = 0;

Titanium.Geolocation.addEventListener('location', update_location);

win.addEventListener('close', function(){
	Titanium.Geolocation.removeEventListener('location', update_location);
});
To reproduce the application crash you have to do this few steps: 1. Start the application 2. Press the home button to switch the application to background running and look carefuly on flashing geolocation icon in the status bar. 3. Be sure that you have data packet internet connection activated. Expand status bar and activate Wi-fi connection, immediately after that press home button 4. If geolocation icon is still flashing repeat step 3 but deactivate Wi-fi connection. I'm sure that maximum 5 changes connection type is enough to see that the geolocation icon disappears (it means that application crashes) You can see this 4 steps in the video [http://youtu.be/9Nr_7OdZsbY]

Comments

  1. Daniel Sefton 2013-04-08

    Cannot reproduce with Samsung Galaxy S2 Android 2.3.6 (with data plan), Ti SDK 3.1.0.v20130403114957 (latest CI build). Repeated step 3 about 15 times.

JSON Source