Skip to content

Instantly share code, notes, and snippets.

@neosinan
Created November 9, 2017 17:17
Show Gist options
  • Save neosinan/9bd0d2b03d38395f1df114753ef90919 to your computer and use it in GitHub Desktop.
Save neosinan/9bd0d2b03d38395f1df114753ef90919 to your computer and use it in GitHub Desktop.
public static final Uri EC = EXTERNAL_CONTENT_URI; //Added as Media image
public static final Uri IC = INTERNAL_CONTENT_URI;
public static final String FILES = "image";
public static final String PROVIDER_AUTHORITY = "com.neosinan.cspr.simplecamera";
public static final Uri CONTENT_URI = Uri.parse("content://"
+ PROVIDER_AUTHORITY + "/");
public static final Uri FILES_URI = Uri.parse("content://"
+ PROVIDER_AUTHORITY + "/" + FILES + "/");
public static final String CONTENT_TYPE = "vnd.android.cursor.dir/image" + PROVIDER_AUTHORITY + "." + FILES;
public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.dir/image" + PROVIDER_AUTHORITY + "." + FILES;
static final int FILE_ROOT = 1;
static final int FILE_ID = 2;
public static final String CONTENT_TYP = "vnd.android.cursor.dir/image";
public static final String CONTENT = "content://vnd.android.cursor.dir/image";
@Nullable
@Override
public String getType(@NonNull Uri uri) {
/*String path = uri.toString();
for (String extension : MIME_TYPES.keySet()) {
if (path.endsWith(extension)) {
return (MIME_TYPES.get(extension));
}
}
return (null);*/
return CONTENT;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment