public abstract class FacebookDialogBase<CONTENT,RESULT> extends java.lang.Object implements FacebookDialog<CONTENT,RESULT>
Modifier and Type | Class and Description |
---|---|
protected class |
FacebookDialogBase.ModeHandler |
Modifier and Type | Field and Description |
---|---|
protected static java.lang.Object |
BASE_AUTOMATIC_MODE |
Modifier | Constructor and Description |
---|---|
protected |
FacebookDialogBase(android.app.Activity activity,
int requestCode) |
protected |
FacebookDialogBase(FragmentWrapper fragmentWrapper,
int requestCode) |
Modifier and Type | Method and Description |
---|---|
boolean |
canShow(CONTENT content)
Indicates whether the dialog can be shown for the content passed in.
|
protected boolean |
canShowImpl(CONTENT content,
java.lang.Object mode) |
protected abstract AppCall |
createBaseAppCall() |
protected android.app.Activity |
getActivityContext() |
protected abstract java.util.List<FacebookDialogBase.ModeHandler> |
getOrderedModeHandlers() |
int |
getRequestCode()
Returns the request code used for this dialog.
|
void |
registerCallback(CallbackManager callbackManager,
FacebookCallback<RESULT> callback)
Allows the registration of a callback that will be executed once the dialog is closed, with
success, cancel or error details.
|
void |
registerCallback(CallbackManager callbackManager,
FacebookCallback<RESULT> callback,
int requestCode)
Allows the registration of a callback that will be executed once the dialog is closed, with
success, cancel or error details.
|
protected abstract void |
registerCallbackImpl(CallbackManagerImpl callbackManager,
FacebookCallback<RESULT> callback) |
protected void |
setRequestCode(int requestCode)
Set the request code for the startActivityForResult call.
|
void |
show(CONTENT content)
Shows the dialog for the content passed in.
|
protected void |
showImpl(CONTENT content,
java.lang.Object mode) |
protected void |
startActivityForResult(android.content.Intent intent,
int requestCode) |
protected FacebookDialogBase(android.app.Activity activity, int requestCode)
protected FacebookDialogBase(FragmentWrapper fragmentWrapper, int requestCode)
public final void registerCallback(CallbackManager callbackManager, FacebookCallback<RESULT> callback)
FacebookDialog
Activity.onCreate(android.os.Bundle)
or
Fragment.onCreate(android.os.Bundle)
methods.registerCallback
in interface FacebookDialog<CONTENT,RESULT>
callbackManager
- CallbackManager instance that will handle the onActivityResultcallback
- Callback to be called upon dialog completionpublic final void registerCallback(CallbackManager callbackManager, FacebookCallback<RESULT> callback, int requestCode)
FacebookDialog
Activity.onCreate(android.os.Bundle)
or
Fragment.onCreate(android.os.Bundle)
methods.registerCallback
in interface FacebookDialog<CONTENT,RESULT>
callbackManager
- CallbackManager instance that will handle the Activity Resultcallback
- Callback to be called upon dialog completionrequestCode
- The request code to use, this should be outside of the range of those
reserved for the Facebook SDK
FacebookSdk.isFacebookRequestCode(int)
.protected abstract void registerCallbackImpl(CallbackManagerImpl callbackManager, FacebookCallback<RESULT> callback)
protected void setRequestCode(int requestCode)
FacebookSdk.isFacebookRequestCode(int)
.requestCode
- the request code to use.public int getRequestCode()
public boolean canShow(CONTENT content)
FacebookDialog
canShow
in interface FacebookDialog<CONTENT,RESULT>
content
- the content to checkprotected boolean canShowImpl(CONTENT content, java.lang.Object mode)
public void show(CONTENT content)
FacebookDialog
show
in interface FacebookDialog<CONTENT,RESULT>
content
- the content to showprotected void showImpl(CONTENT content, java.lang.Object mode)
protected android.app.Activity getActivityContext()
protected void startActivityForResult(android.content.Intent intent, int requestCode)
protected abstract java.util.List<FacebookDialogBase.ModeHandler> getOrderedModeHandlers()
protected abstract AppCall createBaseAppCall()