I have to download a remote image and show it in a ImageView. In iOS works prefectly but in Android doesn't work. The image size is 190x190, and the url is correct because the same url works in iOS. This is my code:
View:
<ScrollView id="scrollView" showVerticalScrollIndicator="true">
<Label id="titleLabel"></Label>
<ImageView id="qr"></ImageView>
<View id="codigoView">
<Label id="codigoLabel"></Label>
<Label id="numeroLabel"></Label>
</View>
<Button id="condicionesButton" onClick="condicionesAction"></Button>
<Button id="localizacionButton" onClick="localizacionAction"></Button>
<Button id="emailButton" onClick="emailAction"></Button>
</ScrollView>
Style:
"#qr":{
top: 5,
width: 190,
height: 190
}
Controller:
var qrString = args.get('qrcode');
$.qr.image = Alloy.Globals.qr_url + qrString;
$.qr.addEventListener('load', function(e){
alert('Picture loaded');
});
This alert does never showed.
The url is:
https://api.qrserver.com/v1/create-qr-code/?size=190x190&data="akjlsdfkjalskdjfal"
And the image is a png.
My question in Appcelerator Q&A
EDIT:
This can cause the problem?
For Android, if there is a redirect and change in protocol, it will not follow. For example, from http to https and vice versa