-
Notifications
You must be signed in to change notification settings - Fork 185
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
StartCameraIntent -> NullPointerException crash #47
Comments
@StephenMilone Did you granted |
@StephenMilone this problem is in your TedBottomPicker code, line:408 'Uri photoURI = FileProvider.getUriForFile(getContext(), getContext().getApplicationContext().getPackageName() + ".provider", imageFile); ' . this error is authority name didn't end with ".provider". adding provider meta data |
Hey how can i solve this issues ? any idea |
This problem is still topical on Android API 29 (Android 10). Application can create files only in own directory. The problem is in this line:
I think that storageDir should be app directory.
|
Temp solution: add to your manifest file <application |
I already do this, but in Android R this thing will be deprecated. |
Now google asks to delete this android:requestLegacyExternalStorage="true", otherwise no updates will be allowed. So what we have to do? |
Here is the crash log
Exception java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.getCanonicalPath()' on a null object reference
android.support.v4.content.FileProvider$SimplePathStrategy.getUriForFile (FileProvider.java:695)
android.support.v4.content.FileProvider.getUriForFile (FileProvider.java:400)
gun0912.tedbottompicker.TedBottomPicker.startCameraIntent (TedBottomPicker.java:414)
gun0912.tedbottompicker.TedBottomPicker.access$100 (TedBottomPicker.java:57)
gun0912.tedbottompicker.TedBottomPicker$3.onItemClick$5359dc9a (TedBottomPicker.java:275)
gun0912.tedbottompicker.adapter.ImageGalleryAdapter$1.onClick (ImageGalleryAdapter.java:180)
android.view.View.performClick (View.java:5612)
From a MotoZ running 7.0, using 1.0.12 of this library
Let me know whatever else I can do to help. thanks!
The text was updated successfully, but these errors were encountered: