Android SDK Version
  • java.lang.Object
    • ContentProvider
      • com.facebook.FacebookContentProvider

public class FacebookContentProvider
extends 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 Summary
Constructor and Description
FacebookContentProvider() 
Method Summary
Modifier and TypeMethod and Description
intdelete(Uri uri, java.lang.String s, java.lang.String[] strings) 
static java.lang.StringgetAttachmentUrl(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.StringgetType(Uri uri) 
Uriinsert(Uri uri, ContentValues contentValues) 
booleanonCreate() 
android.os.ParcelFileDescriptoropenFile(android.net.Uri uri, java.lang.String mode) 
Cursorquery(Uri uri, java.lang.String[] strings, java.lang.String s, java.lang.String[] strings2, java.lang.String s2) 
intupdate(Uri uri, ContentValues contentValues, java.lang.String s, java.lang.String[] strings) 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail

FacebookContentProvider

public FacebookContentProvider()
Method Detail

getAttachmentUrl

public 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.
Parameters:
applicationId - the Facebook application ID of the application
Returns:
the String to use as the authority portion of a content URI.

onCreate

public boolean onCreate()

query

public Cursor query(Uri uri,
                    java.lang.String[] strings,
                    java.lang.String s,
                    java.lang.String[] strings2,
                    java.lang.String s2)

getType

public java.lang.String getType(Uri uri)

insert

public Uri insert(Uri uri,
                  ContentValues contentValues)

delete

public int delete(Uri uri,
                  java.lang.String s,
                  java.lang.String[] strings)

update

public int update(Uri uri,
                  ContentValues contentValues,
                  java.lang.String s,
                  java.lang.String[] strings)

openFile

public android.os.ParcelFileDescriptor openFile(android.net.Uri uri,
                                                java.lang.String mode)
                                         throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException