I googled for 2 weeks to find what I want. However, I am not able to find answer to my question and I have no idea how it could be done by Google Photos developers. The screenshots below are from Google Photos app.
When I click Take a photo
, it starts(or opens) the camera and allows to take pictures OR record videos. I can also start camera to take picture and record video in different intents using following codes:
startActivityForResult(new Intent(MediaStore.ACTION_IMAGE_CAPTURE), ACTION_TAKE_PICTURE_RESULT_CODE);
startActivityForResult(new Intent(MediaStore.ACTION_VIDEO_CAPTURE), ACTION_TAKE_VIDEO_RESULT_CODE);
Those lines works without any bug/problem. But my question is, how to start camera to take pictures OR record videos?
I hope my problem(question) is clear.
But my question is, how to start camera to take pictures OR record videos?
You don't, if you want to get the result. There is no ACTION_IMAGE_OR_VIDEO_CAPTURE
, for example. You would need to allow the user to choose what to do before starting ACTION_IMAGE_CAPTURE
or ACTION_VIDEO_CAPTURE
.
I have no idea how it could be done by Google Photos developers. The screenshots below are from Google Photos app.
Your question has nothing to do with Google Photos. After all:
Intent
, if the user has other camera apps installedIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With