Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3093] Android: Non-cached network images will not appear in TiUIImageView

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T02:00:54.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.6.0 M10
ComponentsAndroid
Labelsandroid, defect, regression, release-1.6.0, reported-1.6.0
ReporterBill Dawson
AssigneeBill Dawson
Created2011-04-15T03:36:42.000+0000
Updated2011-04-17T02:00:54.000+0000

Description

If our cache implementation does not cache an image (such as if the http header when retrieving that image says to not cache it), it fails to appear in the image view.

Failcase app.js:

Titanium.UI.setBackgroundColor('#000');
var win = Titanium.UI.createWindow({  
    title:'Test',
    backgroundColor:'#000',
    exitOnClose: true
});
var thisURL = "module=MultiSites&action=getEvolutionGraph&period=day&date=2011-01-04,2011-02-02&evolutionBy=visits&columns=nb_visits&idSite=7&idsite=7&viewDataTable=sparkline";

var paramArray = thisURL.split("&");
for(var i=0,ilen=paramArray.length;i<ilen;i++){
    var thisKeyValue = paramArray[i].split("=");
    thisKeyValue[1] = Ti.Network.encodeURIComponent(thisKeyValue[1]);
    paramArray[i] = thisKeyValue.join("=");
}
var encodedURI = paramArray.join("&");
var encodedURL = "http://demo.piwik.org/index.php?" + encodedURI;
Ti.API.info(encodedURL);

var imageView = Ti.UI.createImageView({
    image: encodedURL
});
 
win.add(imageView);
win.open();

Comments

  1. Bill Dawson 2011-04-15

    (from [26b410ecbf9ceeaaebf8d59bdd8c6a4ac7ddc899]) [#3093 state:fixed-in-qa] Make sure that remote images which don't land in our cache are still fetched. https://github.com/appcelerator/titanium_mobile/commit/26b410ecbf9ceeaaebf8d59bdd8c6a4ac7ddc899"> https://github.com/appcelerator/titanium_mobile/commit/26b410ecbf9c...

  2. Bill Dawson 2011-04-15

    (from [7a685409bdad14f753ea6e8429383707e4fbc748]) [#3093 state:fixed-in-qa] Make sure that remote images which don't land in our cache are still fetched. https://github.com/appcelerator/titanium_mobile/commit/7a685409bdad14f753ea6e8429383707e4fbc748"> https://github.com/appcelerator/titanium_mobile/commit/7a685409bdad...

  3. Opie Cyrus 2011-04-15

    verified emulator 2.2

JSON Source