示例#1
0
  /** Ha csatlakoztunk a servicehez, akkor fut le. */
  private void onServiceReady() {
    Intent intent = new Intent(ProfileActivity.this, TCPService.class);
    intent.putExtra("MESSENGER", new Messenger(messageHandler));
    tcps.onBind(intent);

    if (!tcps.isLogedIn()) {
      intent = new Intent(ProfileActivity.this, LoginActivity.class);
      startActivity(intent);
      return;
    }

    setSwitches();
    swtichInit();

    TextView name = (TextView) findViewById(R.id.profileName);
    name.setText(tcps.getMyName());
  }
示例#2
0
 public void onClick(View v) {
   Log.d("ASD", "ADS");
   tcps.logOut();
   startActivity(new Intent(ProfileActivity.this, LoginActivity.class));
 }
示例#3
0
 public void onClick(View v) {
   tcps.removeMyself();
   startActivity(new Intent(ProfileActivity.this, LoginActivity.class));
 }