I want to start camera activity in my android app and I know how to do that. I want to ask when the camera activity finishes, how can I check as if it was the picture or the video taken by the user?
UPDATED
I have a dialog where it asks 2 things.
- New Photo or Video
- Existing Photo or Video
If it’s no. 1, it means camera will be started and user can either take a picture or the video and it will return to the activity.
If it’s no.2, it mean gallery will be started having pictures and videos for a user to select one and will return back to the activity.
Hello Umair,
I have done this type of application I searched many time but I didn’t get any proper solution so I changed your my menu & they are now
1)Take New Photo
2)Take New Video
3)Existing Image/Video
Process will be like this
1)I use an global variable
2)So when user click on menu one I sets global variable value to 1
3) Start the activity for result like below
}catch(Exception e){
}
If User click on menu 2 I change value of global variable to 2
& starts the activity for result like below.
If user click on 3rd menu I set value to 3
& start the activity for result like below.
This will show all the images & video’s in mobile
Then finally when activity gets closed use global variable to check whether user want to new image or video or existing image/video.
Hope this will help you..