/FileProviderDmo

showcase for Android FileProvider

Primary LanguageJavaApache License 2.0Apache-2.0

FileProviderDemo

Simple showcase for Android FileProvider use.

As of Android 7.0 ,due to the File System permission changes

attempts to pass a file:// URI trigger a FileUriExposedException.

Quote from Changes in nougat

install two Separate apps here

  1. Server
    • Save bimap to sd card (please grant storage permission)
    • Generate Uri with FileProvider
    • Send it to another App via Intent(startActivityForResult)
  2. Client
    • Grab the Intent and read bitmap from contentProvider
    • Client set bitmap to imageView

Based on