I'm following the Facebook tutorial on how to implement the Facebook Login flow to my Android app. It works fine with UiLifecycleHelper and Session implementations:
private UiLifecycleHelper uiHelper;
private Session.StatusCallback callback =
new Session.StatusCallback() {
@Override
public void call(Session session,
SessionState state, Exception exception) {
onSessionStateChange(session, state, exception);
}
};
In the onSessionStateChange i check if the state is opened and start the MainActivity, and everything works ok. My doubt here is: do i have to reimplement this code (UiLifeCycleHelper, onSessionStateChange) on every Activity of my app or not? And if not, how i can control the Facebook Session flow through the activities?