Esempio n. 1
0
        @Override
        public void handleMessage(Message msg) {

          User u = (User) msg.getData().getSerializable("user");
          if (u == null) {
            Intent intent = new Intent(SplanshActivity.this, UserRegisterActivity.class);
            startActivity(intent);
            SplanshActivity.this.finish();
          } else {
            SqlliteHander.getTnstantiation(SplanshActivity.this).saveUser(u);
            Intent intent = new Intent(SplanshActivity.this, MMHomeActivity.class);
            startActivity(intent);
            SplanshActivity.this.finish();
          }
        }
Esempio n. 2
0
  private void checkUserInfo() {
    User info = SqlliteHander.getTnstantiation(this).queryUser();
    if (info == null) {
      new CheckUserThread().start();

    } else {
      try {
        Thread.sleep(3000);
      } catch (InterruptedException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
      Intent intent = new Intent(this, MMHomeActivity.class);
      startActivity(intent);
      this.finish();
    }
  }