當前位置: 首頁>>代碼示例>>Java>>正文


Java SessionState.equals方法代碼示例

本文整理匯總了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);
        }
    }
}
 
開發者ID:pacomf,項目名稱:Shorcial,代碼行數:20,代碼來源:Inicio.java

示例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);
        }
    }
}
 
開發者ID:makinj,項目名稱:MeNextAndroid,代碼行數:19,代碼來源:MainActivity.java

示例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);
		}
	}
}
 
開發者ID:vegaen,項目名稱:UbiNomadLib,代碼行數:17,代碼來源:FacebookConnector.java

示例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();
        }
    }
}
 
開發者ID:pacomf,項目名稱:Shorcial,代碼行數:12,代碼來源:Logout.java

示例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();
		}
	}
}
 
開發者ID:jonathangerbaud,項目名稱:Klyph,代碼行數:11,代碼來源:TitledFragmentActivity.java

示例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();
		}
	}
}
 
開發者ID:jonathangerbaud,項目名稱:Klyph,代碼行數:11,代碼來源:PreferencesActivity.java


注:本文中的com.facebook.SessionState.equals方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。