I've been searching the simple example to take a photo, and save it using URI and retrieve the photo for image processing , I've tried lot of example code, but none of them went smoothly.
Is there anyone have the example code?
I've been searching the simple example to take a photo, and save it using URI and retrieve the photo for image processing , I've tried lot of example code, but none of them went smoothly.
Is there anyone have the example code?
there are several example to capture image and store it and open it...
1. Android Camera API - Tutorial
2. Android Developers
3. Camera Example on Github
4. Another Example
I had the same problem.
I was testing some codes from the internet, and couldn't find any. Then, I studied some basics codes from developer.android. After that, I mixed two different codes and my one worked! Here it goes!
the XML files just have a Button and a ImageView and do not forget to declare in your android manifest the permissions:
for more informations a suggest: https://developer.android.com/training/camera/photobasics.html#TaskPhotoView https://www.youtube.com/watch?v=je9bdkdNQqg
please use the following code.
XML :
define a variable like this
Use the code for calling camera from android.
and in the class calling this override the onActivityResult function and enter the code below.