Ejemplo n.º 1
0
 public void setTitle() {
   title = getString(R.string.facebook_main_menu);
   FacebookUser.SimpleFBUser user = orm.getSimpleFacebookUser(getLoginUserID());
   if (user != null) {
     title = user.name;
     user.despose();
     user = null;
   } else {
     if (perm_session != null) {
       long uids[] = new long[1];
       uids[0] = perm_session.getLogerInUserID();
       facebookA.getBasicUsersAsync(
           uids,
           new FacebookAdapter() {
             public void getUsers(List<FacebookUser> users) {
               if (users != null && users.size() > 0) {
                 Log.d(TAG, "---get login user account -------- name:" + users.get(0).getName());
                 title = users.get(0).getName();
                 orm.addFacebookUser(users);
                 updateTitle(title);
               }
             }
           });
     }
   }
 }
Ejemplo n.º 2
0
  @Override
  protected void onResume() {
    super.onResume();
    if (doSetTitleAfterLoginInOnResume == true) {
      String temptitle = getString(R.string.facebook_main_menu);
      FacebookUser.SimpleFBUser user = orm.getSimpleFacebookUser(getLoginUserID());
      if (user != null) {
        temptitle = user.name;
        user.despose();
        user = null;
      }
      setTitle(temptitle);
      setTitle();

      if (notifies != null) {
        notifies.msg.unread = 0;
        notifies.entInvite.uids.clear();
        notifies.poke.unread = 0;
        notifies.grdInvite.uids.clear();
        notifies.frdRequest.uids.clear();
        processNotificationSummary(notifies);
      }
    }
    doSetTitleAfterLoginInOnResume = false;

    // cancel first
    AlarmManager alarmMgr = (AlarmManager) mContext.getSystemService(Context.ALARM_SERVICE);
    Intent i = new Intent();
    i.setClassName("com.ast.free", "com.ast.free.ui.FacebookProfileActivity");
    i.setAction(ACTION_CHECK_CONTECT);
    PendingIntent pi = PendingIntent.getActivity(this, 0, i, PendingIntent.FLAG_CANCEL_CURRENT);
    alarmMgr.cancel(pi);

    // resume to call
    alarmComming(false);
  }
Ejemplo n.º 3
0
 public void setItem(FacebookUser.SimpleFBUser user) {
   info.despose();
   info = null;
   info = user;
   setUI();
 }