Android SDK Version
  • java.lang.Object
    • com.facebook.gamingservices.GamingImageUploader

public class GamingImageUploader
extends java.lang.Object
Constructor Summary
Constructor and Description
GamingImageUploader(Context context) 
Method Summary
Modifier and TypeMethod and Description
voiduploadToMediaLibrary(java.lang.String caption, Bitmap imageBitmap, boolean shouldLaunchMediaDialog)
Uploads an image to a player's Gaming Media Library.
voiduploadToMediaLibrary(java.lang.String caption, Bitmap imageBitmap, boolean shouldLaunchMediaDialog, GraphRequest.Callback callback)
Uploads an image to a player's Gaming Media Library.
voiduploadToMediaLibrary(java.lang.String caption, Uri imageUri, boolean shouldLaunchMediaDialog)
Uploads an image to a player's Gaming Media Library.
voiduploadToMediaLibrary(java.lang.String caption, Uri imageUri, boolean shouldLaunchMediaDialog, GraphRequest.Callback callback)
Uploads an image to a player's Gaming Media Library.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail

GamingImageUploader

public GamingImageUploader(Context context)
Method Detail

uploadToMediaLibrary

public void uploadToMediaLibrary(java.lang.String caption,
                                 Bitmap imageBitmap,
                                 boolean shouldLaunchMediaDialog)
Uploads an image to a player's Gaming Media Library.
After uploading the player will receive a notification that a new item on their media library is ready to share. If shouldLaunchMediaDialog is set to true this will also trigger the Media Dialog to open and allow immediate sharing.
Parameters:
caption - the user generated caption for the image, can be null
imageBitmap - a bitmap with the image that will be uploaded.
shouldLaunchMediaDialog - if set to True will open the Media Dialog in the FB App to allow the user to share the uploaded image.

uploadToMediaLibrary

public void uploadToMediaLibrary(java.lang.String caption,
                                 Bitmap imageBitmap,
                                 boolean shouldLaunchMediaDialog,
                                 GraphRequest.Callback callback)
Uploads an image to a player's Gaming Media Library.
After uploading the player will receive a notification that a new item on their media library is ready to share. If shouldLaunchMediaDialog is set to true this will also trigger the Media Dialog to open and allow immediate sharing.
Parameters:
caption - the user generated caption for the image, can be null
imageBitmap - a bitmap with the image that will be uploaded.
shouldLaunchMediaDialog - if set to True will open the Media Dialog in the FB App to allow the user to share the uploaded image.
callback - a callback that will be called when the request is completed to handle success or error conditions, can be null.

uploadToMediaLibrary

public void uploadToMediaLibrary(java.lang.String caption,
                                 Uri imageUri,
                                 boolean shouldLaunchMediaDialog)
                          throws java.io.FileNotFoundException
Uploads an image to a player's Gaming Media Library.
After uploading the player will receive a notification that a new item on their media library is ready to share. If shouldLaunchMediaDialog is set to true this will also trigger the Media Dialog to open and allow immediate sharing.
Parameters:
caption - the user generated caption for the image, can be null
imageUri - the file:// or content:// Uri to the image on device
shouldLaunchMediaDialog - if set to True will open the Media Dialog in the FB App to allow the user to share the uploaded image.
Throws:
java.io.FileNotFoundException - if the file doesn't exist

uploadToMediaLibrary

public void uploadToMediaLibrary(java.lang.String caption,
                                 Uri imageUri,
                                 boolean shouldLaunchMediaDialog,
                                 GraphRequest.Callback callback)
                          throws java.io.FileNotFoundException
Uploads an image to a player's Gaming Media Library.
After uploading the player will receive a notification that a new item on their media library is ready to share. If shouldLaunchMediaDialog is set to true this will also trigger the Media Dialog to open and allow immediate sharing.
Parameters:
caption - the user generated caption for the image, can be null
imageUri - the file:// or content:// Uri to the image on device
shouldLaunchMediaDialog - if set to True will open the Media Dialog in the FB App to allow the user to share the uploaded image.
callback - a callback that will be called when the request is completed to handle success or error conditions, can be null.
Throws:
java.io.FileNotFoundException - if the file doesn't exist