I thought I'd pass this on to users of INTENT ID (Share intents and anothers important Intents). Could save some B4A developers some time.
For quite a while now I've been using the convenient INTENT ID Library (by Douglas Farias) for sharing files, without any problems. However, just yesterday, all the file sharing intents suddenly stopped working on my Pixel XL after installation of the latest patch (March 5, 2017) of Android 7.1.1. Intents all still work perfectly on my Nexus 6 running Android 6.0.1.
The reason for this is more than likely as explained by Erel in Sharing files from your app with File Provider:
(Also look at Share txt files for a share file example)
For quite a while now I've been using the convenient INTENT ID Library (by Douglas Farias) for sharing files, without any problems. However, just yesterday, all the file sharing intents suddenly stopped working on my Pixel XL after installation of the latest patch (March 5, 2017) of Android 7.1.1. Intents all still work perfectly on my Nexus 6 running Android 6.0.1.
The reason for this is more than likely as explained by Erel in Sharing files from your app with File Provider:
"Starting from Android 7 - Nougat,it is not possible to share a file directly (file:// uri). It will result with a FileUriExposedException. This is relevant even if you don't set the targetSdkVersion to 24.
The solution is to use FileProvider from Android support library."
Time to do some work and add FileProvider to my app!The solution is to use FileProvider from Android support library."
(Also look at Share txt files for a share file example)
Last edited: