Last active
January 7, 2017 15:14
-
-
Save Krita3/a6fe6af1f4776898b87af9ac81fbc58e to your computer and use it in GitHub Desktop.
Kit-Lab_Android: FileProvider URI New Sample @20170107
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 仮に .../files/directory_name/hoge.txt を共有する場合 | |
String shareFilePath = getFilesDir() + "/hoge.txt"; | |
File shareFile = new File(shareFilePath); | |
Uri shareUri = FileProvider.getUriForFile( | |
getContext(), | |
BuildConfig.APPLICATION_ID + ".fileprovider", | |
shareFile | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment