Created
January 14, 2016 10:57
-
-
Save soulfly/c81835ee236c232c229a to your computer and use it in GitHub Desktop.
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
// init test user | |
final QBUser qbUser = new QBUser(); | |
qbUser.setId(ApplicationConfig.getInstance().getTestUserId1()); | |
qbUser.setPassword(ApplicationConfig.getInstance().getTestUserPassword1()); | |
log("login with user: " + qbUser); | |
// | |
// | |
if(!chatService.isLoggedIn()) { | |
class MyTask extends AsyncTask<Void, Void, Void> { | |
@Override | |
protected void onPreExecute() { | |
super.onPreExecute(); | |
} | |
@Override | |
protected Void doInBackground(Void... params) { | |
try { | |
chatService.login(qbUser); | |
} catch (SmackException | IOException | XMPPException e) { | |
e.printStackTrace(); | |
} | |
return null; | |
} | |
@Override | |
protected void onPostExecute(Void result) { | |
super.onPostExecute(result); | |
} | |
} | |
new MyTask().execute(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment