-
public class GamingImageUploader
-
-
Constructor Summary
Constructors Constructor Description GamingImageUploader(Context context)
-
Method Summary
Modifier and Type Method Description voiduploadToMediaLibrary(String caption, Bitmap imageBitmap, boolean shouldLaunchMediaDialog)Uploads an image to a player's Gaming Media Library. voiduploadToMediaLibrary(String caption, Bitmap imageBitmap, boolean shouldLaunchMediaDialog, GraphRequest.Callback callback)Uploads an image to a player's Gaming Media Library. voiduploadToMediaLibrary(String caption, File imageFile, boolean shouldLaunchMediaDialog)Uploads an image to a player's Gaming Media Library. voiduploadToMediaLibrary(String caption, File imageFile, boolean shouldLaunchMediaDialog, GraphRequest.Callback callback)Uploads an image to a player's Gaming Media Library. voiduploadToMediaLibrary(String caption, Uri imageUri, boolean shouldLaunchMediaDialog)Uploads an image to a player's Gaming Media Library. voiduploadToMediaLibrary(String caption, Uri imageUri, boolean shouldLaunchMediaDialog, GraphRequest.Callback callback)Uploads an image to a player's Gaming Media Library. -
-
Constructor Detail
-
GamingImageUploader
GamingImageUploader(Context context)
-
-
Method Detail
-
uploadToMediaLibrary
void uploadToMediaLibrary(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 medialibrary is ready to share. If shouldLaunchMediaDialog is set to true this will also trigger theMedia Dialog to open and allow immediate sharing.
- Parameters:
caption- the user generated caption for the image, can be nullimageBitmap- a bitmap with the image that will be uploaded.shouldLaunchMediaDialog- if set to True will open the Media Dialog in the FB App to allowthe user to share the uploaded image.
-
uploadToMediaLibrary
void uploadToMediaLibrary(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 medialibrary is ready to share. If shouldLaunchMediaDialog is set to true this will also trigger theMedia Dialog to open and allow immediate sharing.
- Parameters:
caption- the user generated caption for the image, can be nullimageBitmap- a bitmap with the image that will be uploaded.shouldLaunchMediaDialog- if set to True will open the Media Dialog in the FB App to allowthe user to share the uploaded image.callback- a callback that will be called when the request is completed to handle successor error conditions, can be null.
-
uploadToMediaLibrary
void uploadToMediaLibrary(String caption, File imageFile, 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 medialibrary is ready to share. If shouldLaunchMediaDialog is set to true this will also trigger theMedia Dialog to open and allow immediate sharing.
- Parameters:
caption- the user generated caption for the image, can be nullimageFile- the file containing the image to uploadshouldLaunchMediaDialog- if set to True will open the Media Dialog in the FB App to allowthe user to share the uploaded image.
-
uploadToMediaLibrary
void uploadToMediaLibrary(String caption, File imageFile, 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 medialibrary is ready to share. If shouldLaunchMediaDialog is set to true this will also trigger theMedia Dialog to open and allow immediate sharing.
- Parameters:
caption- the user generated caption for the image, can be nullimageFile- the file containing the image to uploadshouldLaunchMediaDialog- if set to True will open the Media Dialog in the FB App to allowthe user to share the uploaded image.callback- a callback that will be called when the request is completed to handle successor error conditions, can be null.
-
uploadToMediaLibrary
void uploadToMediaLibrary(String caption, Uri imageUri, 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 medialibrary is ready to share. If shouldLaunchMediaDialog is set to true this will also trigger theMedia Dialog to open and allow immediate sharing.
- Parameters:
caption- the user generated caption for the image, can be nullimageUri- the file:// or content:// Uri to the image on deviceshouldLaunchMediaDialog- if set to True will open the Media Dialog in the FB App to allowthe user to share the uploaded image.
-
uploadToMediaLibrary
void uploadToMediaLibrary(String caption, Uri imageUri, 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 medialibrary is ready to share. If shouldLaunchMediaDialog is set to true this will also trigger theMedia Dialog to open and allow immediate sharing.
- Parameters:
caption- the user generated caption for the image, can be nullimageUri- the file:// or content:// Uri to the image on deviceshouldLaunchMediaDialog- if set to True will open the Media Dialog in the FB App to allowthe user to share the uploaded image.callback- a callback that will be called when the request is completed to handle successor error conditions, can be null.
-
-
-
-