diff options
author | steckbrief <steckbrief@chefmail.de> | 2016-03-28 23:19:19 +0200 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2016-03-28 23:19:19 +0200 |
commit | 0c0676b7dbf87e24ebcc4714adfb10d91e3d72b8 (patch) | |
tree | b68a39f709c760f8dc67522d1b489e658e1082e0 /src/main/java/de/thedevstack/conversationsplus/providers | |
parent | f2e361d273c228a5007c4a3e257b0b77d5d990d4 (diff) | |
parent | fd6f0a842b61b0f4d1b90f798ebc96eb7da022f0 (diff) |
Merge branch 'master' of repos.thedevstack.de:conversations-plus
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/providers')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/providers/ConversationsPlusFileProvider.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/providers/ConversationsPlusFileProvider.java b/src/main/java/de/thedevstack/conversationsplus/providers/ConversationsPlusFileProvider.java new file mode 100644 index 00000000..a718b161 --- /dev/null +++ b/src/main/java/de/thedevstack/conversationsplus/providers/ConversationsPlusFileProvider.java @@ -0,0 +1,20 @@ +package de.thedevstack.conversationsplus.providers; + +import android.net.Uri; +import android.support.v4.content.FileProvider; + +import de.thedevstack.conversationsplus.ConversationsPlusApplication; +import de.thedevstack.conversationsplus.entities.DownloadableFile; + +/** + * Created by lookshe on 27.03.16. + */ +public class ConversationsPlusFileProvider extends FileProvider { + + private static final String SCHEME = "content"; + private static final String AUTHORITY = "de.thedevstack.conversationsplus"; + + public static Uri createUriForPrivateFile(DownloadableFile file) { + return FileProvider.getUriForFile(ConversationsPlusApplication.getAppContext(), AUTHORITY, file); + } +} |