File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
ScanDemoExample/scanlibrary/src/main Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 2222
2323 <provider
2424 android : name =" androidx.core.content.FileProvider"
25- android : authorities =" com .scanlibrary.provider"
25+ android : authorities =" ${applicationId} .scanlibrary.provider"
2626 android : exported =" false"
2727 android : grantUriPermissions =" true" >
2828 <meta-data
Original file line number Diff line number Diff line change @@ -131,9 +131,9 @@ public void openCamera() {
131131 boolean isDirectoryCreated = file .getParentFile ().mkdirs ();
132132 Log .d ("" , "openCamera: isDirectoryCreated: " + isDirectoryCreated );
133133 if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .N ) {
134- String aut = "com .scanlibrary.provider" ; // As defined in Manifest
134+ String aut = getActivity (). getApplicationContext (). getPackageName () + " .scanlibrary.provider"/* + LIB_SUFFIX*/ ; //needs to be dynamic
135135 Uri tempFileUri = FileProvider .getUriForFile (getActivity ().getApplicationContext (),
136- aut , // As defined in Manifest
136+ aut ,
137137 file );
138138 cameraIntent .putExtra (MediaStore .EXTRA_OUTPUT , tempFileUri );
139139 } else {
You can’t perform that action at this time.
0 commit comments