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

android.os.FileUriExposedException #20

Open
sfdk74 opened this issue Mar 15, 2020 · 1 comment
Open

android.os.FileUriExposedException #20

sfdk74 opened this issue Mar 15, 2020 · 1 comment

Comments

@sfdk74
Copy link

sfdk74 commented Mar 15, 2020

Hi,
It seems for android api >= 24, app crashes when trying to share files.
Here is my stacktrace:
Fatal Exception: android.os.FileUriExposedException: file:///storage/emulated/0/Android/data/com.company.app/files/Log/data_2020-03-09_09%3A31%3A27.csv exposed beyond app through ClipData.Item.getUri() at android.os.StrictMode.onFileUriExposed(StrictMode.java:1978) at android.net.Uri.checkFileUriExposed(Uri.java:2371) at android.content.ClipData.prepareToLeaveProcess(ClipData.java:963) at android.content.Intent.prepareToLeaveProcess(Intent.java:10216) at android.content.Intent.prepareToLeaveProcess(Intent.java:10222) at android.content.Intent.prepareToLeaveProcess(Intent.java:10201) at android.app.Instrumentation.execStartActivity(Instrumentation.java:1667) at android.app.Activity.startActivityForResult(Activity.java:4586) at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:676) at android.app.Activity.startActivityForResult(Activity.java:4544) at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:663) at android.app.Activity.startActivity(Activity.java:4905) at android.app.Activity.startActivity(Activity.java:4873) at com.aditya.filebrowser.fileoperations.FileIO.shareMultipleFiles(FileIO.java:253) at com.aditya.filebrowser.ToolbarActionMode.onActionItemClicked(ToolbarActionMode.java:80) at androidx.appcompat.app.AppCompatDelegateImpl$ActionModeCallbackWrapperV9.onActionItemClicked(AppCompatDelegateImpl.java:2452) at androidx.appcompat.view.StandaloneActionMode.onMenuItemSelected(StandaloneActionMode.java:141) at androidx.appcompat.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:840) at androidx.appcompat.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:158) at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:991) at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:981) at androidx.appcompat.widget.ActionMenuView.invokeItem(ActionMenuView.java:625) at androidx.appcompat.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:151) at android.view.View.performClick(View.java:6614) at android.view.View.performClickInternal(View.java:6587) at android.view.View.access$3100(View.java:784) at android.view.View$PerformClick.run(View.java:26125) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6715) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)

@arunavo4
Copy link

Yes Same issue here looking to solve it by using the File Provider

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

No branches or pull requests

2 participants