use of android.net.Uri in project photo-picker-plus-android by chute.
the class MediaDAO method getLastVideoFromCameraVideos.
/**
* Returns the last video URI from the camera videos on the device.
*
* @param context The application context.
* @return The URI for the requested query.
*/
public static Uri getLastVideoFromCameraVideos(final Context context) {
Uri uri = null;
Cursor cursor = getLastVideoCursor(context);
if (cursor != null && cursor.moveToLast()) {
uri = Uri.fromFile(new File(cursor.getString(cursor.getColumnIndex(MediaStore.Video.Media.DATA))));
}
safelyCloseCursor(cursor);
if (uri == null) {
return Uri.parse("");
}
return uri;
}
use of android.net.Uri in project photo-picker-plus-android by chute.
the class MediaDAO method getLastPhotoThumbnailFromAllPhotos.
/**
* Returns the last photo thumbnail URI from all photos on the device.
*
* @param context The application context.
* @return The URI for the requested query.
*/
public static Uri getLastPhotoThumbnailFromAllPhotos(final Context context) {
Cursor allMediaPhotos = getAllMediaThumbnails(context);
Uri uri = getFirstImageThumbnailUri(allMediaPhotos);
safelyCloseCursor(allMediaPhotos);
if (uri == null) {
return Uri.parse("");
}
return uri;
}
use of android.net.Uri in project photo-picker-plus-android by chute.
the class MediaDAO method getLastVideoThumbnailFromAllVideos.
/**
* Returns the last video thumbnail URI from all videos on the device.
*
* @param context The application context.
* @return The URI for the requested query.
*/
public static Uri getLastVideoThumbnailFromAllVideos(final Context context) {
Cursor allMediaVideos = getAllMediaVideosThumbnails(context);
Uri uri = getFirstVideoThumbnailUri(allMediaVideos);
safelyCloseCursor(allMediaVideos);
if (uri == null) {
return Uri.parse("");
}
return uri;
}
use of android.net.Uri in project photo-picker-plus-android by chute.
the class MediaDAO method getLastVideoFromAllVideos.
/**
* Returns the last video URI from all videos on the device.
*
* @param context The application context.
* @return The URI for the requested query.
*/
public static Uri getLastVideoFromAllVideos(final Context context) {
Cursor allVideos = getAllMediaVideos(context);
Uri uri = getLastVideoItemUri(allVideos);
safelyCloseCursor(allVideos);
if (uri == null) {
return Uri.parse("");
}
return uri;
}
use of android.net.Uri in project photo-picker-plus-android by chute.
the class MediaDAO method getLastPhotoFromAllPhotos.
/* LAST MEDIA */
/**
* Returns the last photo URI from all photos on the device.
*
* @param context The application context.
* @return The URI for the requested query.
*/
public static Uri getLastPhotoFromAllPhotos(final Context context) {
Cursor allMediaPhotos = getAllMediaPhotos(context);
Uri uri = getFirstImageItemUri(allMediaPhotos);
safelyCloseCursor(allMediaPhotos);
if (uri == null) {
return Uri.parse("");
}
return uri;
}
Aggregations