Changeing the backgroundimage with pics from my server

I developed an app with cooking recepies on a sql database on my server. It works so far. Now I am trying to pick pictures from uploads of my Wordpress website.

I tried the following:

set backgroundimage to "http://retslop-subdom5a.synology.me/wp-content/uploads/Fotos/Kochbuch/cook_1.jpg"

in combination with ActivityStarter, WebViewer, Web (the unvisible component), but got only error messages, at least an internal server error.

What is the correct combination and syntax for my URL access to the pics?? Thanks in advance for any hint...

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be. Also what about revealing the error messages you get?

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

How to download a file and save it on your device

Taifun

Hi Taifun,

thank you for your reply. There are too many pics (and other files) on my server, to download them all on my smartphone. I was successful in accessing video files on my server with the activity starter. I already used a sql database table with adresses of pictures on my server, but I could not reproduce the core of the solution for a single file. I add an approach which is functioning as a query

I add my actual project: there I adress a lot of tables with recepies and have an background-image procedure called "imagechange2" which should pick up images via sql- table from the server.

I thought I start my question with only 1 foto to pick up instead of using a query to pick one out of a sample of some 53 to understand the URL bridge to the android phone.

Thank you very much for your support in advance....

I tried the following:

set backgroundimage to "http://retslop-subdom5a.synology.me/wp-content/uploads/Fotos/Kochbuch/cook_1.jpg "

in combination with ActivityStarter, WebViewer, Web (the unvisible component), but got only error messages, at least an internal server error.

please post a screenshot of only your relevant blocks
thank you

Taifun

Hi Taifun,
I tried your imagepicker_aia and added another testbutton and my URL, but I get the same result: a list of pics on my smartphone:

Then I took one of my other functioning apps with using a sql query for another table just for one pic. It still functions:

I would be glad, if I could produce a solution without the diversion using a sql query. (Or let me say, a more skinny solution)

it seems to be, your server is not configured correctly, because after clicking that link an Internal Error page appears...

see this example link to an image, which works fine http://ai2.appinventor.mit.edu/static/images/logo2.png

to display a remote image as background image, just set it like this
set backgroundimage to http://ai2.appinventor.mit.edu/static/images/logo2.png
without using activity starter, webviewer or web component

Taifun

Thank you very much, Taifun, for your reply.

My problem with the Internal Error is solved very trivial: I corrected the filename from cook_1.jpg to Cook_1.jpg and it works....

I am glad, that there is such a simple way to display a remote image as background image.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.