View an image on Google drive from App Inventor 2

1,240 views
Skip to first unread message

Has

unread,
May 18, 2017, 5:01:48 PM5/18/17
to MIT App Inventor Forum
Dear All, 

maybe a very simple question but I didn't find an answer yet. I have an image file on Google drive (with non restricted access). And I have an image object on a screen in my AI2 app. I set the picture property of my AI2 image object to the link of the Google drive image file but the App does not display the image, when I run it. I'm I missing something, is it not that simple? How can I display that image in my App? 

I hope someone could help. 

Best regards

Taifun

unread,
May 18, 2017, 5:05:14 PM5/18/17
to MIT App Inventor Forum
which url would you use to display the image in a browser?
did you try that url in your app?

Taifun

Tim Carter

unread,
May 19, 2017, 5:41:04 AM5/19/17
to MIT App Inventor Forum

Abraham Getzler

unread,
May 19, 2017, 12:16:51 PM5/19/17
to MIT App Inventor Forum
Hooray, it works!
Strange, the Image component doc says nothing about URLs.
ABG

Capture.PNG

Has

unread,
May 19, 2017, 3:13:57 PM5/19/17
to MIT App Inventor Forum
Hi Folks, 
thanks. The link above works for me as well. I don't know what is wrong with my picture then. I do some more trials & report. 

Has

unread,
May 19, 2017, 4:26:55 PM5/19/17
to MIT App Inventor Forum
Strange! My url style https://drive.google.com/file/d/0B4GHZ_U3cIC2enVpeFk4NnV2bW8/view?usp=sharing 
works from the web browser but does not work from the app. Any hints for what reasons?

Taifun

unread,
May 19, 2017, 4:30:54 PM5/19/17
to MIT App Inventor Forum
what about using the suggested url style from Tim?
Taifun

Tim Carter

unread,
May 20, 2017, 5:13:57 AM5/20/17
to mitappinv...@googlegroups.com
Stick it in a simple html file and you will see why...

<!DOCTYPE html >
<head></head>
<body>
Your link<br><br>
        My Link<br><br>
</body>
</html>

Reason is the link you have is a link to access not a link to show, in your web browser it probably opens up in a viewer of some kind. Even my link is not really a ink to show (in normal html terms), just a workaround to overcome its "Googleness"
Reply all
Reply to author
Forward
0 new messages