-
- All Implemented Interfaces:
-
com.facebook.FacebookDialog
public abstract class FacebookDialogBase<CONTENT, RESULT> implements FacebookDialog<CONTENT, RESULT>
com.facebook.internal is solely for the use of other packages within the Facebook SDK for Android. Use of any of the classes in this package is unsupported, and they may be modified or removed without warning at any time.
-
-
Field Summary
Fields Modifier and Type Field Description private intrequestCodeprivate CallbackManagercallbackManager
-
Method Summary
Modifier and Type Method Description intgetRequestCode()Returns the request code used for this dialog. voidsetRequestCode(int requestCode)Set the request code for the startActivityForResult call. CallbackManagergetCallbackManager()voidsetCallbackManager(@Nullable() CallbackManager callbackManager)Set the callback manager that will handle callbacks for this dialog. final voidregisterCallback(CallbackManager callbackManager, FacebookCallback<RESULT> callback)Allows the registration of a callback that will be executed once the dialog is closed, withsuccess, cancel or error details. final voidregisterCallback(CallbackManager callbackManager, FacebookCallback<RESULT> callback, int requestCode)Allows the registration of a callback that will be executed once the dialog is closed, withsuccess, cancel or error details. booleancanShow(CONTENT content)Indicates whether the dialog can be shown for the content passed in. voidshow(CONTENT content)Shows the dialog for the content passed in. -
-
Method Detail
-
getRequestCode
int getRequestCode()
Returns the request code used for this dialog.
-
setRequestCode
void setRequestCode(int requestCode)
Set the request code for the startActivityForResult call. The requestCode should be outside ofthe range of those reserved for the Facebook SDK .
- Parameters:
requestCode- the request code to use.
-
getCallbackManager
CallbackManager getCallbackManager()
-
setCallbackManager
void setCallbackManager(@Nullable() CallbackManager callbackManager)
Set the callback manager that will handle callbacks for this dialog. It will be used if theandroidx activity result APIs are available.
-
registerCallback
final void registerCallback(CallbackManager callbackManager, FacebookCallback<RESULT> callback)
Allows the registration of a callback that will be executed once the dialog is closed, withsuccess, cancel or error details. This should be called in the or methods.
- Parameters:
callbackManager- CallbackManager instance that will handle the onActivityResultcallback- Callback to be called upon dialog completion
-
registerCallback
final void registerCallback(CallbackManager callbackManager, FacebookCallback<RESULT> callback, int requestCode)
Allows the registration of a callback that will be executed once the dialog is closed, withsuccess, cancel or error details. This should be called in the or methods.
- Parameters:
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 thosereserved for the Facebook SDK isFacebookRequestCode.
-
canShow
boolean canShow(CONTENT content)
Indicates whether the dialog can be shown for the content passed in.
- Parameters:
content- the content to check
-
-
-
-