IMAGE URL IN MOBILE APP - WEB SERVICE

IMAGE URL IN MOBILE APP - WEB SERVICE

  

Hi there, i tried to call  web service that return URL. Then i put image widget that refers to the URL. Unfortunately the image is not shown but if i run in the browser it works. My question, is the URL only work in the web.. unfortunately i found different explanation (https://success.outsystems.com/Documentation/10/Reference/Mobile_Interfaces/Designing_the_Layout/Image):

Is it typo or i misunderstood it? tq

Here the browser rendering the mobile app, but in my apk the text shown, but the image blanks:

Hi Indra,

I suggest that you try your app in OutSystems Now and go the console (press the screen with 2 fingers) and check if there are any messages (errors or warnings).

There is an error like this: No Content Security Policy meta tag found. Please add one when using the cordova-plugin-whilelist plugin. Is it the error of the image widget? Does it know the img src element like in the web? So, how to solve it?

I am confuse why it works in browser launched from the mobile app, but doesn't shown in the apk itself. 

many thanks, indra

Can you try hardcoding the url of the image instead of fetching from the service and see if it works?

João Neves wrote:

Can you try hardcoding the url of the image instead of fetching from the service and see if it works?

tq, i've tried, at design time the image shows up:

when i click the blue button (run), in the browser it shows up, but in the outsystems now and apk still blank.

In the outstystems log debug,  the error is also the same. Is it because only browser can render the URL as the others do not have tag something like <img src?  i am still confused about the hybrid term.

thank you.

Well, thats odd. Can you share the oml?

João Neves wrote:

Well, thats odd. Can you share the oml?


sure, here u are.. thank you

Solution

Found the problem. You're trying to reach an image over http, which is not supported by the platform (due to the security restrictions applied). If you change the url to https you'll be fine.

Solution

João Neves wrote:

Found the problem. You're trying to reach an image over http, which is not supported by the platform (due to the security restrictions applied). If you change the url to https you'll be fine.

u rock! thank you very much sir.