Skip to content

Instantly share code, notes, and snippets.

@Krita3
Last active January 7, 2017 15:14
Show Gist options
  • Save Krita3/a6fe6af1f4776898b87af9ac81fbc58e to your computer and use it in GitHub Desktop.
Save Krita3/a6fe6af1f4776898b87af9ac81fbc58e to your computer and use it in GitHub Desktop.
Kit-Lab_Android: FileProvider URI New Sample @20170107
// 仮に .../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