From 796336b55eaab495a28cf220b2bbd732add6ee8a Mon Sep 17 00:00:00 2001 From: Sarthak9504 <130087140+Sarthak9504@users.noreply.github.com> Date: Sat, 15 Jun 2024 21:09:57 +0530 Subject: [PATCH] Fix: App crashing when clicked on share button to share the QR code of the user. (#1656) Description: The ImageUtils.kt file was not using the correct APPLICATION_ID which was causing the IllegalArgumentException for the provider. I have corrected the code using the correct APPLICATION_ID. --- mifospay/src/main/java/org/mifospay/utils/ImageUtils.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mifospay/src/main/java/org/mifospay/utils/ImageUtils.kt b/mifospay/src/main/java/org/mifospay/utils/ImageUtils.kt index e925df7e8..3bad751f0 100644 --- a/mifospay/src/main/java/org/mifospay/utils/ImageUtils.kt +++ b/mifospay/src/main/java/org/mifospay/utils/ImageUtils.kt @@ -5,6 +5,7 @@ import android.graphics.Bitmap import android.net.Uri import androidx.core.content.FileProvider import dagger.hilt.android.qualifiers.ApplicationContext +import org.mifospay.BuildConfig import java.io.File import java.io.FileOutputStream import java.io.IOException @@ -22,7 +23,7 @@ object ImageUtils { stream.close() uri = FileProvider.getUriForFile( context, - "org.mifospay.provider", file + BuildConfig.APPLICATION_ID + ".provider", file ) } catch (e: IOException) { e.printStackTrace()