Created
February 3, 2016 14:42
-
-
Save g0dzill3r/9f6ad7e59063d64c27a7 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
TigerTextRequester.login(String username, String password, LoginListener listener) | |
LoginListener.onLoggedIn(JSONObject userJson) | |
TigerTextAccountManager.getAuthDataFromJson(userJson) | |
// Pass the bundle from the last step into either addAccount() or updateAccount() | |
if (!mAccountManager.hasAccount(mUsername)) { | |
mAccountManager.addAccount(mUsername, authData); | |
} else { | |
mAccountManager.updateAccount(mUsername, authData); | |
} | |
// All the web API calls are getting the auth_token from the currently active account | |
// So you need to set the account in use to be active | |
mAccountManager.setActiveAccount(mUsername); | |
sendMessage(String body, String recipientId, int ttl, boolean dor, SendMessageListener listener) | |
getMessage(String messageId, FetchMessageListener listener) | |
ContentResolver resolver = getContentResolver(); | |
ContentValues values = DatabaseHelper.getMessageContentValues(message); | |
resolver.insert(TigerTextContentProvider.CONTENT_MESSAGE_URI, values); | |
values.clear(); | |
values.put(DatabaseContract.LatestMessageTable.COL_CONVO_ID, message.getConvoId()); | |
values.put(DatabaseContract.LatestMessageTable.COL_MESSAGE_ID, message.getMessageId()); | |
resolver.insert(TigerTextContentProvider.LATEST_MESSAGE_URI, values); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment