@@ -12,7 +12,7 @@ export let takePicture = function (options?): Promise<any> {
1212 return new Promise ( ( resolve , reject ) => {
1313 try {
1414 if ( ( < any > android . support . v4 . content . ContextCompat ) . checkSelfPermission (
15- applicationModule . android . currentContext ,
15+ applicationModule . android . context ,
1616 ( < any > android ) . Manifest . permission . CAMERA ) !== android . content . pm . PackageManager . PERMISSION_GRANTED ) {
1717
1818 reject ( new Error ( "Application does not have permissions to use Camera" ) ) ;
@@ -37,7 +37,7 @@ export let takePicture = function (options?): Promise<any> {
3737 }
3838
3939 if ( ( < any > android . support . v4 . content . ContextCompat ) . checkSelfPermission (
40- applicationModule . android . currentContext ,
40+ applicationModule . android . context ,
4141 ( < any > android ) . Manifest . permission . WRITE_EXTERNAL_STORAGE ) !== android . content . pm . PackageManager . PERMISSION_GRANTED ) {
4242
4343 saveToGallery = false ;
@@ -63,7 +63,7 @@ export let takePicture = function (options?): Promise<any> {
6363 let sdkVersionInt = parseInt ( platform . device . sdkVersion ) ;
6464 if ( sdkVersionInt >= 21 ) {
6565 tempPictureUri = ( < any > android . support . v4 . content ) . FileProvider . getUriForFile (
66- applicationModule . android . currentContext ,
66+ applicationModule . android . context ,
6767 applicationModule . android . nativeApp . getPackageName ( ) + ".provider" , nativeFile ) ;
6868 } else {
6969 tempPictureUri = android . net . Uri . fromFile ( nativeFile ) ;
0 commit comments