aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/providers/ConversationsPlusFileProvider.java
blob: a718b16146cf649444ea7ca5a2e48ce4c6772a21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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);
    }
}