codeestX / GeekNews

:books:A pure reading App based on Material Design + MVP + RxJava2 + Retrofit + Dagger2 + Realm + Glide
3.49k stars 826 forks source link

[BugFix]App will crash when sharing files on Android N or above. #134

Closed AndroidHot closed 6 years ago

AndroidHot commented 6 years ago

For apps targeting Android 7.0, the Android framework enforces the StrictMode API policy that prohibits exposing file:// URIs outside your app. If an intent containing a file URI leaves your app, the app fails with a FileUriExposedException exception.

Reference: https://developer.android.com/about/versions/nougat/android-7.0-changes

Best Regards

codeestX commented 6 years ago

Thanks.