Hi,
I have a strange issue with an ImageView on Android (everything works on the iPhone).
The image is a remote image, I do not have the server under control, the images come from a cms
and have an url like this:
http://www.host.com/image/image?id=69582&timestamp=1335950710974
If I access the image from a desktop browser I receive the following headers(yes, some of them are present two times):
cache-control:public Connection:close Content-Length:16565 Content-Type:image/jpeg Date:Sun, 18 May 2014 18:15:46 GMT ETag:"1332c83d" Expires:Wed, 15 May 2024 18:15:46 UTC Expires:Wed, 15 May 2024 18:15:46 UTC Last-Modified:Wed, 02 May 2012 09:25:00 GMT Server:Apache/2.2.3 (CentOS) Set-Cookie:JSESSIONID=E11F96DE5609D54139166AF553124884; Path=/ url-regex-ignore-pattern:.+/-/.+ url-regex-ignore-pattern:.+/-/.+ Vary:Accept-EncodingThis is the output I get when running the code on android:
[INFO] : Image did load! [DEBUG] : TilesManager: Starting TG #0, 0x2c9f50 [DEBUG] : TilesManager: new EGLContext from framework: 310948 [DEBUG] : GLWebViewState: Reinit shader [DEBUG] : skia: --- SkImageDecoder::Factory returned null [DEBUG] : skia: --- SkImageDecoder::Factory returned null [DEBUG] : skia: --- SkImageDecoder::Factory returned null [DEBUG] : skia: --- SkImageDecoder::Factory returned null [DEBUG] : GLWebViewState: Reinit transferQueue [DEBUG] : skia: --- SkImageDecoder::Factory returned null [DEBUG] : skia: --- SkImageDecoder::Factory returned null [DEBUG] : skia: --- SkImageDecoder::Factory returned null [DEBUG] : skia: --- SkImageDecoder::Factory returned null [DEBUG] : skia: --- SkImageDecoder::Factory returned null [DEBUG] : skia: --- SkImageDecoder::Factory returned null [DEBUG] : skia: --- SkImageDecoder::Factory returned null [DEBUG] : skia: --- SkImageDecoder::Factory returned null [DEBUG] : HTTPClient: The persistent handle is disposed.I also tried to download the image first, like this:
Ti.API.info("Image to load "+image); $.trackImage.addEventListener('load', function(e) { Ti.API.info("Image did load!"); }); $.trackImage.addEventListener('error', function(e) { Ti.API.error("Image did not load! "+JSON.stringify(e)); }); //$.trackImage.setImage(image); var c = Titanium.Network.createHTTPClient(); c.setTimeout(10000); c.onload = function() { if(c.status == 200) { $.trackImage.image = this.responseData; } }; c.open('GET', image); c.send();works perfect on iPhone, does not show the image on Android, but I get "Image did load!" The imageview on android has the correct size, after the image is loaded, but it is just not displayed.
Unfortunately I cannot share the image url. What could I try?
Any ideas?