I have an Image file
that is stored in my local storage
on the Android device itself. Once the user clicks a button I want to send
the Image to the server and receive
it after it has been processed by a python script
in the server
. Then I want to display it in an ImageView and also store it in my local storage. I am looking for both the client and server side implementation. Also, should the server always be running the python script? (An image processing script that processes the image that the client sends and sends it back to the client)
What is the right way of doing this?
What is the basic work flow of such a process?
For example: From what I have understood,
- Client sends an image to the server.
- The server runs the python script on the image (assmuing that it detects a new image and automatically runs the python script)
- After processing, the server responds with the processed image. (Now should I be waiting for the server to send the processed image back? because sometimes there might be a delay)
- The client then displays the image on the
ImageView
I did some research on it and found separate tutorials to send and receive images.
File receive: https://www.androidhive.info/2012/07/android-loading-image-from-url-http/
File upload: https://www.androidhive.info/2014/12/android-uploading-camera-image-video-to-server-with-progress-bar/
Please specify other methods I could use to do it.