Skip to content
This repository has been archived by the owner on Aug 3, 2019. It is now read-only.

Part 2 of handling session #200

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions Simple Facebook/src/com/sromku/simple/fb/SessionManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,30 @@ public boolean onActivityResult(Activity activity, int requestCode, int resultCo
uiLifecycleHelper.onActivityResult(requestCode, resultCode, data, mFacebookDialogCallback);
return true;
}
/*
* code to handle session login state
*/
public boolean onResume() {
uiHelper.onResume();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uiHelper - no such member in this class. It won't compile.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mix the variable from facebook and your code
the correct syntax should be (and the same for the other) uiLifecycleHelper.onResume();

return true
}

public boolean onPause() {
uiHelper.onPause();
return true
}

public boolean onDestroy() {
uiHelper.onDestroy();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take a look: https://github.com/facebook/facebook-android-sdk/blob/master/facebook%2Fsrc%2Fcom%2Ffacebook%2FUiLifecycleHelper.java#L190.
onDestroy() of UiLifecycleHelper does nothing. Why should we add this method?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok again with this
as mentionned will retrieve the unnecessary code that let the app work properly

return true;
}
public boolean onSaveInstanceState(Bundle outState) {
uiHelper.onSaveInstanceState(outState);
return true
}
/*
*end of session management
*/

/**
* Check if we already have Active session. If such exists, then return it,
Expand Down