Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14078] Android: Remote images not loaded at second load attempt when no internet connection on first load attempt

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2013-06-05T00:00:53.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.2.0
ComponentsAndroid
Labelscommunity
ReporterPhilippe Wueger
AssigneeShak Hossain
Created2013-05-09T10:30:22.000+0000
Updated2013-10-22T21:50:46.000+0000

Description

Problem

If a ImageView with a remote image is displayed to the user for the first time when no internet connectivity is available, the remote image will also not show if it is displayed later on when internet connectivity is available. Only after a restart of the application the remote image will show. Titanium SDK 3.2.0 (HEAD) Android 4.2.1 Nexus S

Test case

1. Run the app from the code below with the device in "flight mode" (no internet connectivity) 2. Press the button "Open". The remote image will not show as expected. 3. Go back with the back button. 4. Put the app into background (do not close the app completely) 5. Disable flight mode and wait for the internet connectivity to restore 6. Open the app. 7. Press the button "Open". I would now expect the remote image to appear. But it won't appear. It will only appear, if the app is fully closed and opened again.
var win = Ti.UI.createWindow({});

var b = Ti.UI.createButton({
	title: 'Open'
});
win.add(b);

b.addEventListener('click', function(evt) {
	var win2 = Ti.UI.createWindow({ modal: false });
	
	var v1 = Ti.UI.createImageView({
		height: '64dp',
		width: '64dp',
		hires: true,
		backgroundColor: 'green',
		image: "https://raw.github.com/appcelerator/titanium_mobile/master/android/templates/app/default/Resources/android/appicon.png",
	});

	win2.add(v1);
	win2.open();
});

win.open();

Comments

  1. Philippe Wueger 2013-05-21

    Pull Request: https://github.com/appcelerator/titanium_mobile/pull/4307
  2. Lokesh Choudhary 2013-10-22

    Verified the fix we can see the image when internet connectivity is resumed. Thus closing. Environment: Appcel Studio : 3.2.0.201310221639 Ti SDK : 3.2.0.v20131022050844 Mac OSX : 10.8.5 CLI - 3.2.0 with hash 72f7426b4ee6c2d2883c666d5b7e03906a16012f Device: Samsung Galaxy S4 running android 4.2.2

JSON Source