0

I'm using Android Studio to develop an application. I'd like to ask the user of the app to make a photo or upload an image of his device, and I'd like to know if there's any way that I can take this file, upload it to a hosting server and get the URL of the hosted image.

Thanks!

Dakrad95
  • 1
  • 2

1 Answers1

0

You'll basically need to use the Http and File classes that Android provides, decode the image file from camera when the result is returned. Then AsyncTask to process the uploading work.

This should help

Tutorial: http://www.codepool.biz/tech-frontier/android/take-a-photo-from-android-camera-and-upload-it-to-a-remote-php-server.html

Source Code: https://github.com/DynamsoftRD/JavaHTTPUpload

Community
  • 1
  • 1
Machado
  • 14,105
  • 13
  • 56
  • 97