本文整理匯總了Java中com.facebook.SessionState.equals方法的典型用法代碼示例。如果您正苦於以下問題:Java SessionState.equals方法的具體用法?Java SessionState.equals怎麽用?Java SessionState.equals使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.facebook.SessionState
的用法示例。
在下文中一共展示了SessionState.equals方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onSessionStateChange
import com.facebook.SessionState; //導入方法依賴的package包/類
private void onSessionStateChange(Session session, SessionState state, Exception exception) {
// Si hacemos login o logout, el estado de la sesion cambiará, por lo que en esta función se controla y se muestra el fragment correspondiente en funcion de si la sesión esta abierta o cerrada.
if (isResumed) {
FragmentManager manager = getSupportFragmentManager();
int backStackSize = manager.getBackStackEntryCount();
for (int i = 0; i < backStackSize; i++) {
manager.popBackStack();
}
// check for the OPENED state instead of session.isOpened() since for the
// OPENED_TOKEN_UPDATED state, the selection fragment should already be showing.
if (state.equals(SessionState.OPENED)) {
if (Utilities.checkGooglePlayServiceAvailability(this)) {
goToHome(session);
}
} else if (state.isClosed()) {
showFragment(LOGIN, false);
}
}
}
示例2: onSessionStateChange
import com.facebook.SessionState; //導入方法依賴的package包/類
private void onSessionStateChange(Session session, SessionState state) {
if (isResumed) {
// check for the OPENED state instead of session.isOpened() since for the
// OPENED_TOKEN_UPDATED state, the selection fragment should already be showing.
clearBackStack();
if (state.equals(SessionState.OPENED)) {
//logged inn with fb
showFragment(JOINED, false);
makeMeRequest(session);
checkAuth();
} else if (state.isClosed()) {
((JoinedFragment)fragments[JOINED]).profilePictureView.setProfileId(null);
authenticated=false;
userId=-1;
showFragment(SPLASH, false);
}
}
}
示例3: onSessionStateChange
import com.facebook.SessionState; //導入方法依賴的package包/類
private void onSessionStateChange(Session session, SessionState state, Exception exception) {
if (isResumed) {
FragmentManager manager = ubiNomadActivity.getSupportFragmentManager();
int backStackSize = manager.getBackStackEntryCount();
for (int i = 0; i < backStackSize; i++) {
manager.popBackStack();
}
// check for the OPENED state instead of session.isOpened() since for the
// OPENED_TOKEN_UPDATED state, the selection fragment should already be showing.
if (state.equals(SessionState.OPENED)) {
ubiNomadActivity.onLoggedIn(Provider.FACEBOOK);
} else if (state.isClosed()) {
ubiNomadActivity.onLoggedOut(Provider.FACEBOOK);
}
}
}
示例4: onSessionStateChange
import com.facebook.SessionState; //導入方法依賴的package包/類
private void onSessionStateChange(Session session, SessionState state, Exception exception) {
// Si hacemos login o logout, el estado de la sesion cambiará, por lo que en esta función se controla y se muestra el fragment correspondiente en funcion de si la sesión esta abierta o cerrada.
if (isResumed) {
if (state.equals(SessionState.OPENED)) {
// Si esta abierta la sesion no hacer nada
} else if (state.isClosed()) {
// Si no está abierta, está cerrada, redirigir a Login
goToLogin();
}
}
}
示例5: onSessionStateChange
import com.facebook.SessionState; //導入方法依賴的package包/類
protected void onSessionStateChange(final Session session, SessionState state, Exception exception)
{
if (session != null && session.isOpened())
{
if (state.equals(SessionState.OPENED_TOKEN_UPDATED))
{
tokenUpdated();
}
}
}
示例6: onSessionStateChange
import com.facebook.SessionState; //導入方法依賴的package包/類
private void onSessionStateChange(final Session session, SessionState state, Exception exception)
{
if (session != null && session.isOpened())
{
if (state.equals(SessionState.OPENED_TOKEN_UPDATED))
{
tokenUpdated();
}
}
}