Skip to content

resolved recently created clients fail to open issue #2321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion feature/client/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<application>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:authorities="com.mifos.mifosxdroid.provider"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have configured multiple flavors in our app, such as demo and prod. If we define the package name statically, it will cause platform clashes, making it impossible to install both applications simultaneously.

And I don't think by changing this it does resolve the issue as indicated in the PR title.

Copy link
Author

@ufuomaisaac ufuomaisaac Mar 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That actually resolved the issue as there was no reference to application id upon clicking it
The error that was resolved was "Couldn't find meta-data for provider with authority com.mifos.mifosxdroid.provider"

Alright, I will try and focus on resolving the issue within the feature module without making changes to the manifest.
Thank you for your response

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It sounds like we need to update the package name in the specific function or module where we're handling file-saving functionality. The issue might arise because the package name or cache directory we've defined doesn't match the current flavor or version of the installed app. To resolve this, we should ensure the package name and cache directory to aligns with the app's current configuration.

maybe the issue is in these files not in manifest -

or here -

private fun Context.createTempImageFile(): File {
    val timeStamp = SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()).format(Date())
    val imageFileName = "JPEG_${timeStamp}_"
    val storageDir = externalCacheDir ?: cacheDir
    return File.createTempFile(
        imageFileName,
        ".png",
        storageDir
    )
}

or updating file_provider or checking the path name might solve this issue here - https://github.com/openMF/android-client/blob/1bc8f49747d48550e515d30e75c373c93e5dfa49/feature/client/src/main/res/xml/feature_client_path_provider.xml

update with existing

    <external-cache-path name="external_cache" path="." />
    <cache-path name="internal_cache" path="." />

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, I will look into that.
Thank you

android:exported="false"
android:grantUriPermissions="true">
<meta-data
Expand Down
4 changes: 2 additions & 2 deletions mifosng-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ dependencies {
testImplementation(libs.junit.jupiter)
testImplementation(libs.androidx.core.testing)

//Splash Screen
// Splash Screen
implementation(libs.androidx.core.splashscreen)

// Hilt dependency
Expand All @@ -146,7 +146,7 @@ dependencies {
// ViewModel utilities for Compose
implementation(libs.androidx.hilt.navigation.compose)

//LifeCycle
// LifeCycle
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.lifecycle.viewModelCompose)
implementation(libs.androidx.lifecycle.runtimeCompose)
Expand Down
Loading