问题
This description was very hard to word. Basically I want to know if it is possible to access a website inside Android coding without actually sending the user to that website.
What I want to do is use a free website that generates a random pic after you upload your picture to it. I want the user to be able to upload their selected image to the website, and I guess somehow in code make that website generate an edited image and retrieve it back into the application for further use.
I know this sounds really ridiculous but I just wanted to know if this was at all possible before I try writing the code. Thanks!
回答1:
The first thing you need to do is do an HTTP post upload of your image, as outlined here:
Upload image
Then you can do your processing on the server side - you didn't specify which platform you are planning to use on the server side, but in PHP you might want to look at this:
HTTP POST file upload
Finally, you'll want to retrieve the resultant image you made available on the server side this way:
Retrieve image from an URL
来源:https://stackoverflow.com/questions/9546859/access-website-within-android-code-and-retrieve-a-generated-image