Android SDK Implementation¶
Init¶
This method is used for sdk initialization.
void
Init(Context context)
Method Parameters | |
---|---|
Context | Active context. If active context changes, Init() should be called again. |
ActivateDevice¶
This method is used for activate device on powerfactor.
void
ActivateDevice(String otp, PWFUserContract userData, String pin, PWFCallBack<T> callback)
Method Parameters | |
---|---|
otp | This parameter is the activation otp sent to the customer via SMS. |
userData | Customer unique data as PWFUserContract. |
pin | The 6 digit value that the user input. |
callback | This callback parameter is called automatically when the operation completed. PWFCallBack<T> is the interface for error & callback management. |
Login¶
This method used for secure login via PowerFactor with just only 6 digits pin.
void
Login(PWFUserContract userData, String pin, PWFCallBack<PWFLoginResponse> callback)
Method Parameters | |
---|---|
userData | Customer unique data as PWFUserContract. |
pin | The 6 digit value that the user input. |
callback | This callback parameter is called automatically when the Login completed. PWFCallBack<T> is the interface for error & callback management. |
Logout¶
This method used for secure logout.
void
Logout(PWFCallBack<PWFLoginResponse> callback)
Method Parameters | |
---|---|
callback | This callback parameter is called automatically when the Login completed. PWFCallBack<T> is the interface for error & callback management. |
GetUserList¶
This method used for get activation list on current device.
ArrayList<PWFUserContract> GetUserList()
Method Result | |
---|---|
ArrayList<PWFUserContract> | List of PWFUserContract. |
ChangePin¶
This method used to change the user’s pin.
void
ChangePin(PWFUserContract userData, String oldPin, String newPin, final PWFCallBack<PWFResponseModelBase> callback)
Method Parameters | |
---|---|
userData | Customer unique data as PWFUserContract. |
oldPin | The 6 digit current pin value. |
newPin | The 6 digit new pin value. |
callback | This callback parameter is called automatically when the operation completed. PWFCallBack<T> is the interface for error & callback management. |
DeleteUser¶
This method used for delete activation from current device.
void
DeleteUser(PWFUserContract userData, final PWFCallBack<PWFResponseModelBase> callback)
Method Parameters | |
---|---|
userData | Customer unique data as PWFUserContract. |
callback | This callback parameter is called automatically when the operation completed. PWFCallBack<T> is the interface for error & callback management. |
Common Types¶
PWFUserContract
Properties | |
---|---|
CustomerId | This field should be unique identifier for customer. |
UserCode | This field should be unique identifier for customer. UserCode should use when there is more than one person using the same customer number. |
UserFullName | User Name and Surname. (Optional) |
PWFCallBack<T>
interface
PWFCallBack<Response extends PWFResponseModelBase>
Methods | |
---|---|
onCompleted(T) | This method triggered automatically when the operation completed. |
onFailure(PWFCallBackError) | This method triggered automatically when the operation failure with error details. |