public final class NativeAppCallAttachmentStore extends Object
This class works in conjunction with NativeAppCallContentProvider
to allow apps to attach binary
attachments (e.g., images) to native dialogs launched via the FacebookDialog
class. It stores attachments in temporary files and allows the Facebook application to retrieve them via
the content provider.
Callers are generally not expected to need to use this class directly;
see OpenGraphActionDialogBuilder.setImageAttachmentsForObject
for an example of a function
that will accept attachments, attach them to the native dialog call, and add them to the content provider
automatically.
Constructor and Description |
---|
NativeAppCallAttachmentStore() |
Modifier and Type | Method and Description |
---|---|
void |
addAttachmentsForCall(Context context,
UUID callId,
Map<String,Bitmap> imageAttachments)
Adds a number of bitmap attachments associated with a native app call.
|
void |
cleanupAttachmentsForCall(Context context,
UUID callId)
Removes any temporary files associated with a particular native app call.
|
File |
openAttachment(UUID callId,
String attachmentName) |
public void addAttachmentsForCall(Context context, UUID callId, Map<String,Bitmap> imageAttachments)
openFile
.context
- the Context the call is being made fromcallId
- the unique ID of the callimageAttachments
- a Map of attachment names to Bitmaps; the attachment names will be part of
the URI processed by openFileIOException
public void cleanupAttachmentsForCall(Context context, UUID callId)
context
- the Context the call is being made fromcallId
- the unique ID of the callpublic File openAttachment(UUID callId, String attachmentName) throws FileNotFoundException
FileNotFoundException