0

I would like to know when an activity I have started ends. How can I do that when the code related to the activity is:

intent_record_video = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
intent_record_video.putExtra(MediaStore.EXTRA_DURATION_LIMIT, 5);
startActivityForResult(intent_record_video, VIDEO_CAPTURE);

The code above is all the code related to the activity of recording a video. I want to know when it has ended/ be notified when it ends. How do I do that?

Vishwad
  • 251
  • 3
  • 18
  • 2
    Override `onActivityResult`. – Michael Apr 14 '21 at 15:19
  • 1
    [Here's how](https://stackoverflow.com/questions/10407159/how-to-manage-startactivityforresult-on-android) – javdromero Apr 14 '21 at 15:28
  • thank you for these responses, but the problem is that this solution is for custom coded activities. I use an in-built camera activity for recording a video (MediaStore.ACTION_VIDEO_CAPTURE). Hence, I don't think this will be of much help. – Vishwad Apr 14 '21 at 16:44
  • If you're starting the activity for a result, you'll know when it's done when you get `onActivityResult`, as the linked question describes. – Ryan M Apr 14 '21 at 22:35

0 Answers0