Start the trim video activity with an intent

前端 未结 2 1280
长发绾君心
长发绾君心 2020-12-17 02:54

I can take a video with an intent now what are the details to create an intent to start the default video trimmer activity? And check if it present on the device?

2条回答
  •  既然无缘
    2020-12-17 03:20

    Try this may it helps

    Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
    intent.putExtra("android.intent.extra.durationLimit", 30000);
    intent.putExtra("EXTRA_VIDEO_QUALITY", 0);
    startActivityForResult(intent, ActivityRequests.REQUEST_TAKE_VIDEO);
    

    This code works well on API >=2.2, but the duration limit does not work on API 2.1

提交回复
热议问题