public class FacebookContentProvider
extends android.content.ContentProvider
Implements a
ContentProvider that can be used to provide binary attachments (e.g., images) to calls made
via FacebookDialog
.
Note that this ContentProvider is only necessary if an application wishes to attach images, etc., that are stored in memory and do not have another way to be referenced by a content URI. For images obtained from, e.g., the Camera or Gallery, that already have a content URI associated with them, use of this class is not necessary.
If an application wishes to attach images that are stored in-memory within the application,
this content provider must be listed in the application's AndroidManifest.xml, and it should be
named according to the pattern
"com.facebook.app.FacebookContentProvider{FACEBOOK_APP_ID}"
.
See the getContentProviderName
method.
Constructor and Description |
---|
FacebookContentProvider() |
Modifier and Type | Method and Description |
---|---|
int |
delete(android.net.Uri uri,
java.lang.String s,
java.lang.String[] strings) |
static java.lang.String |
getAttachmentUrl(java.lang.String applicationId,
java.util.UUID callId,
java.lang.String attachmentName)
Returns the name of the content provider formatted correctly for constructing URLs.
|
java.lang.String |
getType(android.net.Uri uri) |
android.net.Uri |
insert(android.net.Uri uri,
android.content.ContentValues contentValues) |
boolean |
onCreate() |
android.os.ParcelFileDescriptor |
openFile(android.net.Uri uri,
java.lang.String mode) |
android.database.Cursor |
query(android.net.Uri uri,
java.lang.String[] strings,
java.lang.String s,
java.lang.String[] strings2,
java.lang.String s2) |
int |
update(android.net.Uri uri,
android.content.ContentValues contentValues,
java.lang.String s,
java.lang.String[] strings) |
applyBatch, attachInfo, bulkInsert, call, canonicalize, dump, getCallingPackage, getContext, getPathPermissions, getReadPermission, getStreamTypes, getWritePermission, isTemporary, onConfigurationChanged, onLowMemory, onTrimMemory, openAssetFile, openAssetFile, openFile, openFileHelper, openPipeHelper, openTypedAssetFile, openTypedAssetFile, query, setPathPermissions, setReadPermission, setWritePermission, shutdown, uncanonicalize
public static java.lang.String getAttachmentUrl(java.lang.String applicationId, java.util.UUID callId, java.lang.String attachmentName)
applicationId
- the Facebook application ID of the applicationpublic boolean onCreate()
onCreate
in class android.content.ContentProvider
public android.database.Cursor query(android.net.Uri uri, java.lang.String[] strings, java.lang.String s, java.lang.String[] strings2, java.lang.String s2)
query
in class android.content.ContentProvider
public java.lang.String getType(android.net.Uri uri)
getType
in class android.content.ContentProvider
public android.net.Uri insert(android.net.Uri uri, android.content.ContentValues contentValues)
insert
in class android.content.ContentProvider
public int delete(android.net.Uri uri, java.lang.String s, java.lang.String[] strings)
delete
in class android.content.ContentProvider
public int update(android.net.Uri uri, android.content.ContentValues contentValues, java.lang.String s, java.lang.String[] strings)
update
in class android.content.ContentProvider
public android.os.ParcelFileDescriptor openFile(android.net.Uri uri, java.lang.String mode) throws java.io.FileNotFoundException
openFile
in class android.content.ContentProvider
java.io.FileNotFoundException