Package com. streamwide. smartms. lib. core. api. account
Types
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
This callback is used in reset application data process task
Link copied to clipboard
Link copied to clipboard
STWAccountManagerThis class represent the API for all actions/event related to the user accountThis class offers several possible operations defined in the following list:Manage all account settingsGet company idListen to all changes of account settings
- Login
- Logout
- Manage all account settings
- Listen to all changes of account settings
STWAccountManager.getInstance().login(BaseLoginActivity.this, number, companyId, new STWAccountManager.CompletionCallback() { public void onSecondStepStarted(int loginStatus) { //Code... } public void onCompletion(int loginType, Bundle data) { //Code... } public void onError(int loginFailReason, Bundle data) { //Code... } });Content copied to clipboardSTWAccountManager.getInstance().confirmLogin(context, activationCode, new STWAccountManager.CompletionCallback() { public void onSecondStepStarted(int loginStatus) { //Your code here } public void onCompletion(int loginType, Bundle data) { //Your code here } public void onError(int loginFailReason, Bundle data) { //Your code here } });Content copied to clipboard
STWAccountManager.getInstance().launchLogoutProcess(context,true, new LogoutCallBack() {
public void onStart() {
//Code ...
}
public void onFinish() {
//Code ...
}
public void onError() {
//Code ...
}
});
Content copied to clipboard
//Delete user picture
STWAccountManager.getInstance().deleteUserPicture(new STWSettingRequestCallback() {
public void onSuccess(){
//Code ...
}
public void onFail() {
//Code ...
}
public void onError(){
//Code ...
}
});
Content copied to clipboard
String companyId = STWAccountManager.getInstance().getCompanyId(context);
Content copied to clipboard
STWAccountManager.getInstance().registerAccountSettingsListener(new STWAccountSettingsListener() {
public void onAccountSettingsUpdated(){
//Code..
}
});
Content copied to clipboard
Link copied to clipboard
A callback to account session states and errors
Link copied to clipboard
Listener used to handle events related App version changes
Link copied to clipboard
Link copied to clipboard
Description :
This callback is used in STWAccountManager when doing the local user disconnectExample of use :
- Implementation :
LogoutCallBack mLogoutCallBack = new LogoutCallBack() { public void onStart() { } public void onFinish() { } public void onError(STWAccountError error) { } }Content copied to clipboard - Register :
STWAccountManager.getInstance().logout(context,informAdmin, mLogoutCallBack);Content copied to clipboard
Link copied to clipboard
This is a callback to handle events related to Oauth token request.