Services - ReconoSERID/SDK-ReconoSERID-Android GitHub Wiki
Services
LibraryReconoSer
#!java
LibraryReconoSer.init(this, guidConv, datos);
Class that initializes the SDK, dagger and the singleton ServicesOlimpia
from where the services will be called. It will perform a query convention in order to save the active services.
#!java
public static void init(Application app, @NotNull String guidConv, @NotNull String datos) {
sComponent = DaggerAppComponent.builder().appModule(new AppModule(app)).build();
webService = ServicesOlimpia.getInstance();
webService.initServer(guidConv, datos);
context = app;
}
ServicesOlimpia
Singleton from where you can call the services. All the methods are composed by a callback that will return onSuccess
and onError
.
To request a service you must call the instance ServicesOlimpia.getInstance().agreement_name
.
onError
Returns if the query was unsuccessful either because of Olympia services or connection errors.
Any TransactionResponse "Is Successful" : false
object will be returned in onError.
Parameters ResponseTransactionResponse
Parameter | Type | Description |
---|---|---|
isSuccessful | String | Response Status |
errorTransaction | List | Additional data |
Parameters ErrorTransaction
Parameter | Type | Description |
---|---|---|
code | String | Error code |
description | String | Description of the error |
onSuccess
Every Object TransactionResponse "Successful" : true
will be returned in onSuccess. And an Object or a List<> will be returned depending on the service.