Access the website in android code and get the generated image

This description was very difficult to formulate. Basically, I want to know if it is possible to access a website inside Android coding without actually sending the user to this website.

What I want to do is use a free website that generates random rice after you upload it to it. I want the user to be able to upload the selected image to the website, and, be that as it may, in the code, this website creates an edited image and returns it back to the application for future use.

I know this sounds very funny, but I just wanted to find out if this is possible before I try to write code. Thanks!

+1
source share
1 answer

The first thing you need to do is to send your image via the HTTP message, as described here:

Upload image

Then you can perform server-side processing - you did not specify which platform you plan to use on the server side, but in PHP you can look at this:

Download HTTP POST file

Finally, you will want to get the resulting image that you have made available on the server side as follows:

Get image from URL

0
source

Source: https://habr.com/ru/post/1399841/


All Articles