Código para tomar videos
En un botón agregan un bloque "add source directly" y agregan el siguiente código:
Intent takeVideo = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
if (takeVideo.resolveActivity(getPackageManager()) !=null) {
startActivityForResult(takeVideo, REQ_CD_*nombre de su componente en mayúsculas");
Aquí les dejo el tutorial:
https://youtu.be/Gtz0Nr3HVgc
Intent takeVideo = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
if (takeVideo.resolveActivity(getPackageManager()) !=null) {
startActivityForResult(takeVideo, REQ_CD_*nombre de su componente en mayúsculas");
Aquí les dejo el tutorial:
https://youtu.be/Gtz0Nr3HVgc
Comentarios
Publicar un comentario