billyjacobs2014 commented on issue #135: Read the video file on android
URL: 
https://github.com/apache/cordova-plugin-media-capture/issues/135#issuecomment-570123926
 
 
   It appears you have to request permissions at run-time in order to access 
the file. 
   I used this plugin - cordova-plugin-android-permissions
   
   Then before I capture the video I do the following:
   
   ` 
   var permissions = (window as any).cordova.plugins.permissions;
   permissions.checkPermission(permissions.READ_EXTERNAL_STORAGE, (status: 
{hasPermission: boolean}) => {
             if(status.hasPermission) {
               (navigator as 
any).device.capture.captureVideo(this.takeVideoFromHybridApp, (error: any) => {
                 // Error Handling Here
               }, {limit:1});
             } else {
               permissions.requestPermission(permissions.READ_EXTERNAL_STORAGE, 
(status: {hasPermission: boolean}) => {
                 if(status.hasPermission) {
                   (navigator as 
any).device.capture.captureVideo(this.takeVideoFromHybridApp, (error: any) => {
                     // Error Handling Here
                   }, {limit:1});
                 } else {
                   // Error Handling Here
                 }
               }, () => {
                 // Error Handling Here
               });
             }
           }, () => {
             // Error Handling Here
           `});``

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to