Best Android Studio Tutorial on Upload Image to Server (Part 1) — Get Image from Camera and Gallery
Follow me on https://facebook.com/kosalgeek to get more update video tutorials.
Source code: https://goo.gl/2M2qTQ
Part 2 here https://www.youtube.com/watch?v=EmOzhbGFEAk
You can learn Android Volley at https://www.youtube.com/playlist?list=PL0DVoqvV_Tdhv5SziqTgGTBBsg2Mu6XvF
One of the most popular Apps these days is about the capabilities to do selfies, the one that uses a phone camera to take photos of oneself. The camera is on every smart phone devices now while most of them has two cameras, the back and the front. You can photos and store them online. Most popular social networks like Facebook, Instagram, Twitter, Google+ etc. let you store limitless of photos. Well, how can you make an app like that?
So in this tutorial, you will learn just about that, about how to get image from camera or choose it from gallery and upload to a server. However, this is part of the tutorial, I will focus on the camera and gallery while the second one will be about the uploading.
For the camera, you need to add a camera feature and two permissions. And then dispatch the camera and get the saved images in onActivityResult.
And for the gallery, you don’t need any permissions while other steps are quite similar to the camera.
To ease the development, I decided to create my own library just for that and I called it PhotoUtil. It consists of classes for camera, gallery, loading images and decoding a image to a base64 string. You can download it at https://github.com/kosalgeek/PhotoUtil
Tweets by okosal
Expert in adsense, keywords, cpc, usa, uk, increase, tutorial, google, product, tech, hosting, cheap hosting, free hosting, domain name, dedicated server.