当前位置: 首页>>代码示例>>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;未经允许,请勿转载。