[AC-2634] Android: Geolocation crash after changing internet connection type using Wi-fi button on expanded status bar.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-04-08T18:58:55.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | android, crash, defect, triage |
Reporter | Maciej Czerwinski |
Assignee | Mauro Parra-Miranda |
Created | 2012-10-27T21:00:18.000+0000 |
Updated | 2016-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]
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.