Skip to content

Instantly share code, notes, and snippets.

@skyler
Created May 28, 2010 15:02
Show Gist options
  • Save skyler/417262 to your computer and use it in GitHub Desktop.
Save skyler/417262 to your computer and use it in GitHub Desktop.
private void login(String username, String password)
{
LoginCredentials creds = new LoginCredentials(username, password);
AsyncAPI.getInstance().login(creds, new ITaskCallback() {
@Override
public void onResult(AbstractRunnable task)
{
boolean success = task.getResult();
if (success) {
Login.this.runOnUiThread(new Runnable() {
@Override
public void run()
{
loginDialog.dismiss();
}
});
Intent intent = new Intent(Login.this, Home.class);
startActivity(intent);
finish();
}
}
@Override
public void onError()
{
//
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment