I have some large files (images and video) which I need to store in a content provider. The android documentation indicates...
If you are exposing byt
Android provides the helper method openFileHelper() that makes implementing the openFile() method very easy. All you have to do, to use this method, is to provide the location of the file in a column named “_data“.
@Override
public ParcelFileDescriptor openFile(Uri uri, String mode)
throws FileNotFoundException {
if (URI_MATCHER.match(uri) != PHOTO_ID) {
throw new IllegalArgumentException
("URI invalid. Use an id-based URI only.");
}
return openFileHelper(uri, mode);
}
Click here for detail