Skip to content

Commit

Permalink
🔨 file provider authority
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek-1-simform authored and shwetachauhan-simform committed Aug 13, 2021
1 parent 5f6bf21 commit 3d8b70a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ object App {

object Version {
const val CODE = 1
const val NAME = "1.7"
const val NAME = "1.8"
}

object Dimension {
Expand Down
14 changes: 7 additions & 7 deletions imagepickerlibrary/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ android {
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName "1.7"
versionName "1.8"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
Expand Down Expand Up @@ -44,17 +44,17 @@ android {
dependencies {

implementation "org.jetbrains.kotlin:kotlin-stdlib:1.5.20"
implementation 'androidx.core:core-ktx:1.5.0'
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.core:core-ktx:1.6.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'com.intuit.sdp:sdp-android:1.0.6'
implementation 'com.intuit.ssp:ssp-android:1.0.6'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
implementation 'androidx.fragment:fragment-ktx:1.3.5'
implementation 'androidx.fragment:fragment-ktx:1.3.6'
implementation 'com.github.bumptech.glide:glide:4.12.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
implementation 'com.github.yalantis:ucrop:2.2.6'
Expand Down
2 changes: 1 addition & 1 deletion imagepickerlibrary/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<application>
<provider
android:name=".ImagePickerFileProvider"
android:authorities="com.app.imagepickerlibrary.provider"
android:authorities="${applicationId}.com.app.imagepickerlibrary.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fun Activity.dispatchTakePictureIntent(onGetImageFromCameraActivityResult: Activ
// Continue only if the File was successfully created
var photoURI: Uri? = null
also { photo ->
photoURI = FileProvider.getUriForFile(this@dispatchTakePictureIntent, "${BuildConfig.LIBRARY_PACKAGE_NAME}.provider", photo)
photoURI = FileProvider.getUriForFile(this@dispatchTakePictureIntent, "${applicationContext.packageName}.${BuildConfig.LIBRARY_PACKAGE_NAME}.provider", photo)
takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI)
onGetImageFromCameraActivityResult.launch(takePictureIntent)
}
Expand Down

0 comments on commit 3d8b70a

Please sign in to comment.