Created
December 11, 2012 07:24
-
-
Save voldyman/4256564 to your computer and use it in GitHub Desktop.
Snippet from CyClient
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void initLogin () { | |
Result res = loginMan.Login(); | |
if (res.success) { | |
status = "LIVE"; | |
mHandler.postDelayed(liveLoginTask, 1800L); | |
} | |
else { | |
//TODO send error to activity | |
mUsernameTxt.setText("Login"); | |
} | |
} | |
private Handler mHandler; | |
Runnable liveLoginTask = new Runnable() { | |
@Override | |
public void run() { | |
Result res = loginMan.LiveLogin(); | |
if (res.success && cont) { | |
status = "LIVE"; | |
mHandler.postDelayed(this, 1800L); | |
} | |
else { | |
//TODO implement error sending to activity | |
status = "LOGIN"; | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment