burhanrashid52 / PhotoEditor

A Photo Editor library with simple, easy support for image editing using paints,text,filters,emoji and Sticker like stories.
MIT License
4.13k stars 991 forks source link

Error to share after save #389

Closed gabrielfs17 closed 2 years ago

gabrielfs17 commented 3 years ago

Describe the bug I try share an image, but the app stop

To Reproduce E/AndroidRuntime: FATAL EXCEPTION: main

Expected behavior

File> EditImageActivity.java

292 - private Uri buildFileProviderUri(@NonNull Uri uri) { return FileProvider.getUriForFile(this, FILE_PROVIDER_AUTHORITY, new File(uri.getPath())); }

287 - Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("image/*"); intent.putExtra(Intent.EXTRA_STREAM, buildFileProviderUri(mSaveImageUri)); startActivity(Intent.createChooser(intent, getString(R.string.msg_share_image))); }

262 - shareImage();

Screenshots/Video/GIFs image

Smartphone Info:

Additional context

E/AndroidRuntime: FATAL EXCEPTION: main Process: com.burhanrashid52.photoediting, PID: 9594 java.lang.IllegalArgumentException: Couldn't find meta-data for provider with authority com.burhanrashid52.photoeditor.fileprovider at androidx.core.content.FileProvider.parsePathStrategy(FileProvider.java:606) at androidx.core.content.FileProvider.getPathStrategy(FileProvider.java:579) at androidx.core.content.FileProvider.getUriForFile(FileProvider.java:417) at com.burhanrashid52.photoediting.EditImageActivity.buildFileProviderUri(EditImageActivity.java:292) at com.burhanrashid52.photoediting.EditImageActivity.shareImage(EditImageActivity.java:287) at com.burhanrashid52.photoediting.EditImageActivity.onClick(EditImageActivity.java:262) at android.view.View.performClick(View.java:8160) at android.view.View.performClickInternal(View.java:8137) at android.view.View.access$3700(View.java:888) at android.view.View$PerformClick.run(View.java:30236) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:246) at android.app.ActivityThread.main(ActivityThread.java:8512) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1139)

burhanrashid52 commented 3 years ago

Is storage permission is enabled ?

tanoDxyz commented 3 years ago

actually you are sharing to another app outside your app's context (roughly speaking) and i guess you need a permission on that uri . add grant read/write uri permission and it will work if all other things are in place.

gabrielfs17 commented 3 years ago

Is storage permission is enabled ? was not requested by the app

gabrielfs17 commented 3 years ago

actually you are sharing to another app outside your app's context (roughly speaking) and i guess you need a permission on that uri . add grant read/write uri permission and it will work if all other things are in place.

Sell ​​as Fulfillment. even if it was right the app should ask for permission and not close abruptly. Are there any undeclared classes

siddharthbhat777 commented 3 years ago

did you find solution for this ? same problem here.

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 20 days with no activity. Remove stale label or comment or this will be closed in 4 days.

github-actions[bot] commented 2 years ago

This issue was closed because it has been stalled for 5 days with no activity.