Class Overview
ImageManager is used to retrieve and store images in the media content
provider.
Summary
Nested Classes |
enum |
ImageManager.DataLocation |
Enumerate type for the location of the images in gallery. |
Public Methods |
static
Uri
|
addImage(ContentResolver cr, String title, long dateAdded, long dateTaken, Double latitude, Double longitude, String directory, String filename, Bitmap source, byte[] jpegData, int[] degree)
Stores a bitmap or a jpeg byte array to a file (using the specified
directory and filename).
|
static
void
|
ensureOSXCompatibleFolder()
OSX requires plugged-in USB storage to have path /DCIM/NNNAAAAA to be
imported.
|
static
String
|
getBucketId(String path)
Matches code in MediaProvider.computeBucketValues.
|
static
int
|
getExifOrientation(String filepath)
|
static
String
|
getLastImageThumbPath()
|
static
String
|
getLastVideoThumbPath()
|
static
boolean
|
hasStorage()
|
static
boolean
|
hasStorage(boolean requireWriteAccess)
|
static
boolean
|
isImageMimeType(String mimeType)
|
final
static
boolean
|
isMediaScannerScanning(ContentResolver cr)
|
static
boolean
|
isVideoMimeType(String mimeType)
|
static
boolean
|
quickHasStorage()
|
static
int
|
roundOrientation(int orientationInput)
|
static
void
|
setImageSize(ContentResolver cr, Uri uri, long size)
|
static
Cancelable<Void>
|
storeImage(Uri uri, ContentResolver cr, int orientation, Bitmap source, byte[] jpegData)
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
Constants
public
static
final
int
INCLUDE_DRM_IMAGES
Constant Value:
2
(0x00000002)
public
static
final
int
INCLUDE_IMAGES
Constant Value:
1
(0x00000001)
public
static
final
int
INCLUDE_VIDEOS
Constant Value:
4
(0x00000004)
public
static
final
int
SORT_ASCENDING
Constant Value:
1
(0x00000001)
public
static
final
int
SORT_DESCENDING
Constant Value:
2
(0x00000002)
Fields
public
static
final
String
CAMERA_IMAGE_BUCKET_ID
public
static
final
String
CAMERA_IMAGE_BUCKET_NAME
public
static
final
Bitmap
DEFAULT_THUMBNAIL
public
static
final
Bitmap
NO_IMAGE_BITMAP
Public Constructors
Public Methods
public
static
Uri
addImage
(ContentResolver cr, String title, long dateAdded, long dateTaken, Double latitude, Double longitude, String directory, String filename, Bitmap source, byte[] jpegData, int[] degree)
Stores a bitmap or a jpeg byte array to a file (using the specified
directory and filename). Also add an entry to the media store for
this picture. The title, dateTaken, location are attributes for the
picture. The degree is a one element array which returns the orientation
of the picture.
public
static
void
ensureOSXCompatibleFolder
()
OSX requires plugged-in USB storage to have path /DCIM/NNNAAAAA to be
imported. This is a temporary fix for bug#1655552.
public
static
String
getBucketId
(String path)
Matches code in MediaProvider.computeBucketValues. Should be a common
function.
public
static
int
getExifOrientation
(String filepath)
public
static
String
getLastImageThumbPath
()
public
static
String
getLastVideoThumbPath
()
public
static
boolean
hasStorage
()
public
static
boolean
hasStorage
(boolean requireWriteAccess)
public
static
boolean
isImageMimeType
(String mimeType)
Returns
- true if the mimetype is an image mimetype.
public
static
boolean
isVideoMimeType
(String mimeType)
Returns
- true if the mimetype is a video mimetype.
public
static
boolean
quickHasStorage
()
public
static
int
roundOrientation
(int orientationInput)