|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.facebook.UiLifecycleHelper
public class UiLifecycleHelper
This class helps to create, automatically open (if applicable), save, and restore the Active Session in a way that is similar to Android UI lifecycles.
When using this class, clients MUST call all the public methods from the respective methods in either an Activity or Fragment. Failure to call all the methods can result in improperly initialized or uninitialized Sessions.
Constructor Summary | |
---|---|
UiLifecycleHelper(Activity activity,
Session.StatusCallback callback)
Creates a new UiLifecycleHelper. |
Method Summary | |
---|---|
void |
onActivityResult(int requestCode,
int resultCode,
Intent data)
To be called from an Activity or Fragment's onActivityResult method. |
void |
onCreate(Bundle savedInstanceState)
To be called from an Activity or Fragment's onCreate method. |
void |
onDestroy()
To be called from an Activity or Fragment's onDestroy method. |
void |
onPause()
To be called from an Activity or Fragment's onPause method. |
void |
onResume()
To be called from an Activity or Fragment's onResume method. |
void |
onSaveInstanceState(Bundle outState)
To be called from an Activity or Fragment's onSaveInstanceState method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UiLifecycleHelper(Activity activity, Session.StatusCallback callback)
activity
- the Activity associated with the helper. If calling from a Fragment,
use Fragment.getActivity()
callback
- the callback for Session status changes, can be nullMethod Detail |
---|
public void onCreate(Bundle savedInstanceState)
savedInstanceState
- the previously saved statepublic void onResume()
public void onActivityResult(int requestCode, int resultCode, Intent data)
requestCode
- the request coderesultCode
- the result codedata
- the result datapublic void onSaveInstanceState(Bundle outState)
outState
- the bundle to save state inpublic void onPause()
public void onDestroy()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |