User status management
#
OverviewThis document describes how to check and retrieve the user status from the Android SDK.
#
Check User StatusTo check the user status, me()
from GuardianSdk
can be used to call the API.
User status may be one of the following types :
registered user, not registered user, withdrawn user, temporarily suspended user...etc.
#
Parameter- none
#
Example// Check user statusGuardianSdk.getInstance().me(new GuardianResponseCallback<MeResponse>() { @Override public void onSuccess(MeResponse result){ ... } @Override public void onFailed(ErrorResult errorResult) { Log.e(TAG, "Error code : " + errorResult.getErrorCode()); Log.e(TAG, "Error message : " + errorResult.getErrorMessage()); }});
#
MeResponseKey | Value | Description |
---|---|---|
rtCode | 0 | Result code |
rtMsg | String | Result message |
name | String | name |
String | ||
uptDt | String | Update date |
phoneNum | String | Phone Number |
The rtCode
will be 0
if the user is properly registered, and the information of that user will come as a data
.
However, if that specific user doesn't exist or is a withdrawn user, the result code and message will appear as follows.
#
ResultCodeResult Code | Description | Solution |
---|---|---|
2007 or 2008 | Unregistered user or different mobile device | - In case of unregistered user, check sign in status and register if necessary - If the mobile device has been changed, register new device |
5005 | Unauthorized user | Contact the person in charge to solve this matter |
5006 | Temporarily suspended user | Contact the person in charge to solve this matter |
5007 | Permanently suspended user | Contact the person in charge to solve this matter |
5008 | Withdrawn user | User accounts can be reactivated within a certain period of time |
#
ErrorResultKey | Value | Description |
---|---|---|
errorCode | Int | Error code |
errorMessage | String | Error message |
If API call fails, the user will receive an errorCode