Android
Our API is RESTful and responds in JSON. Gerencianet uses OAuth to provide authorized access to the API. Our NodeJS SDK is already prepared to perform this authentication automatically.
Below, check out the procedures for installing the Gerencianet SDK in Android:
Pre requirements
- Android
7.0+
Installation via gradle
Tested with
- Android
7.0
e11.0
Basic use
Requires the module and packages:
Although web services responses are in json format, the SDK will convert any server response to a Map <String, Object>. The code must be inside a try-catch and exceptions can be handled as follows:
For homologation environment
Instantiate the module passing its Client_Id, Client_Secret and sandbox being equal to true:
For production environment
To change the environment to production, just set the third sandbox to false, and its production Client_Id and Client_Secret:
PIX API
To use the PIX API, it is necessary to inform the certificate path inside the assets folder and pass the context's assets as a parameter.