本文整理汇总了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();
}
}
}