What I have is a dynamic image that I can change manually (it is an image on a banner-type page and won’t change regularly) by going into a table in my backend (backendless…) and changing the ‘page’ field in the table to ‘Intro’ for the record that holds the image details. This means that the URL which is used as the source for the image component changes (as the URL formula looks for ‘intro’ in the table to construct the URL…).
Anyway, this works. But what is blowing my mind is that the image in preview mode is only showing on one Android phone, and not another (a smaller screened one).
Depending on how I set it up to display, it is sometimes there because I also have a URL attached to the image on ‘component tap’, so if the image is clicked, a webpage will open.
The image is there, but not visible…on the smaller phone if I used the below;
The size of the image I am testing is 3840 = width and 2460 = height.
For the px values above, they are within the width and height size of the smaller phone.
@Mevi Hey, could you possibly help? Spent another few hours trying to figure it out and cannot solve it. I now have a put a border on the image component set at actual size with width = 320 and height = 205. I see image in the border on the larger Galaxy Note phone but only the border on the normal galaxy phone.
I also made the actual image that same size…
If I change ‘width & height’ to ‘fit to content’, in the smaller phone I no longer see the border, just the top line…indicating that nothing is pulling through.
Sounds very odd Dynamic images can be a bit tricky. I’d try a few things, maybe some of these help:
Set the URL of the image into an app variable that you set on app launch, so that the url is “ready” before you even open the page and see if that helps
Try using a static url (=without formula) and see if that makes a difference on how the image shows on the devices, if not, try uploading an image in Composer and displaying it in the app and see if that makes a difference
Try showing the image only after page is opened (put visibility to false and then to true when page is focused for example) and see if that makes a difference
In general I would recommend using a static height (pixels) instead of percentage height, or just basic grow to width while trying these out.
It doesn’t happen often for us, but Android is notorious for being super fragmented and that causing a lot of issues in a lot of app programming for Android, so I’m not surprised we run into that occasionally.
2.So you tried just having the static url without any formula and that would not work either? Nor even if you uploaded the image in Composer? Then I doubt any of the other stuff will help. If no image in any situation will appear on that phone in your app, even if you upload in Composer, then something is seriously screwed. What about the default preview image https://s3.amazonaws.com/appgyver.assets/composer3/images/image_placeholder.png ? does that appear on the smaller device?
1.That formula would not work until you have that data.BannerImage populated, so you need to move the request for getting that data into app launch (and store it in a data variable or app variable) so you can do that.
3.Go to the image component, set its visibility to be bound to a page variable, set that to be false by default, then go to page focused event, set the page variable to true there.
Mevi - One critical piece of info I somehow forgot about…this is also happening on an iphone…i am looking at three phones and the two smaller ones (iphone7 and galaxy S6) display no image in the image component…
So I got it to display on all 3 phones by uploading the image to composer…so no problem there.
Formula on image component visibility = IF(pageVars.Visible == true,true,false) and
Hmm. What about when you open the page in our web preview? What happens then?
Can you check if there are any errors when the image doesn’t show up? If it doesn’t show up, you can just use your browser’s developer console to see any errors. For Android/iOS, use our debugger.