Skip to content
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

App crash when click share button in CreateFragment.java line 224 #64

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

shendew
Copy link

@shendew shendew commented Oct 20, 2023

  • log Note: FATAL EXCEPTION: main , Process: com.czlucius.scan.debug, PID: 9894 , java.lang.IllegalArgumentException: Couldn't find meta-data for provider with authority com.czlucius.scan.provider

*Used mediastore to get the file path.
*Add Extra subject and createrchooser msg to give a idea to user.

* App crash when click share button in CreateFragment.java line 224
@shendew
Copy link
Author

shendew commented Oct 20, 2023

Added

@czlucius
Copy link
Owner

@shendew are you sure this is not because of mismatching package names?
The debug version has a package name of com.czlucius.scan.debug, but the content provider has a name of com.czlucius.scan.provider without the .debug.
I think this just happens on debug builds

@shendew
Copy link
Author

shendew commented Oct 25, 2023

@shendew are you sure this is not because of mismatching package names?
The debug version has a package name of com.czlucius.scan.debug, but the content provider has a name of com.czlucius.scan.provider without the .debug.
I think this just happens on debug builds

Yes It could be, But my code part will work both situations without crash.

@czlucius
Copy link
Owner

@shendew maybe you want to rewrite your PR, such that it uses the content provider instead, but with the app's package name prefixed instead of hardcoded? Both in that file and in the manifest.

I see your patch uses the MediaStore API if an exception is raised. Can you use IllegalArgumentException instead? And can you move strings to strings.xml? Also what's the "mmmm" about?

Additionally, can you remove the extra subject and title? I think it's better to have a consistent experience, and also if it's added it would have to be translated across the many languages my app supports. Alternatively you may want to also translate them and retrieve them from strings resources.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants