CONCRETE
- The concrete base class of the builder.public abstract static class FacebookDialog.Builder<CONCRETE extends FacebookDialog.Builder<?>> extends Object
Modifier and Type | Field and Description |
---|---|
protected Activity |
activity |
protected FacebookDialog.PendingCall |
appCall |
protected String |
applicationId |
protected String |
applicationName |
protected Fragment |
fragment |
protected HashMap<String,Bitmap> |
imageAttachments |
protected HashMap<String,File> |
mediaAttachmentFiles |
Constructor and Description |
---|
FacebookDialog.Builder(Activity activity)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected CONCRETE |
addImageAttachment(String imageName,
Bitmap bitmap) |
protected CONCRETE |
addImageAttachment(String imageName,
File attachment) |
protected List<String> |
addImageAttachmentFiles(Collection<File> bitmapFiles) |
protected List<String> |
addImageAttachments(Collection<Bitmap> bitmaps) |
protected CONCRETE |
addVideoAttachment(String videoName,
File attachment) |
protected String |
addVideoAttachmentFile(File videoFile) |
FacebookDialog |
build()
Constructs a FacebookDialog with an Intent that is correctly populated to present the dialog within
the Facebook application.
|
boolean |
canPresent()
Determines whether the native dialog can be presented (i.e., whether the required version of the
Facebook application is installed on the device, and whether the installed version supports all of
the parameters specified for the dialog).
|
protected abstract EnumSet<? extends FacebookDialog.DialogFeature> |
getDialogFeatures() |
protected abstract Bundle |
getMethodArguments() |
protected String |
getWebFallbackUrlInternal()
This is public primarily to allow its use elsewhere in the Android SDK; developers are discouraged from
consuming this method as the internal API may change.
|
protected void |
putExtra(Bundle extras,
String key,
String value) |
CONCRETE |
setApplicationName(String applicationName)
Sets the name of the application to be displayed in the dialog.
|
protected Bundle |
setBundleExtras(Bundle extras) |
CONCRETE |
setFragment(Fragment fragment)
Sets the fragment that should launch the dialog.
|
CONCRETE |
setRequestCode(int requestCode)
Sets the request code that will be passed to handleActivityResult when this activity completes; the
default is NativeProtocol.DIALOG_REQUEST_CODE.
|
protected final Activity activity
protected final String applicationId
protected final FacebookDialog.PendingCall appCall
protected Fragment fragment
protected String applicationName
public FacebookDialog.Builder(Activity activity)
activity
- the Activity which is presenting the native Share dialog; must not be nullpublic CONCRETE setRequestCode(int requestCode)
requestCode
- the request codepublic CONCRETE setApplicationName(String applicationName)
applicationName
- the name of the Facebook applicationpublic CONCRETE setFragment(Fragment fragment)
onActivityResult
call rather than the Activity.fragment
- the fragment that contains this controlpublic FacebookDialog build()
protected String getWebFallbackUrlInternal()
public boolean canPresent()
protected List<String> addImageAttachments(Collection<Bitmap> bitmaps)
protected List<String> addImageAttachmentFiles(Collection<File> bitmapFiles)
protected abstract Bundle getMethodArguments()
protected abstract EnumSet<? extends FacebookDialog.DialogFeature> getDialogFeatures()