Android SDK (Core)
Integrate EXP Events
3min
To integrate EXP events using the nwCore SDK, developers should follow these steps to implement the observer pattern with the eventListener. The events are delivered as non-null JSON strings, which are divided into two properties: type and payload.
For detailed information on the events, refer to the documentation at the following link: LINK
- Initialize the Observer: After setting or injecting NwCore, call the observer called eventListener to listen for the events.
- Parse the JSON Event: Once an event is received, it will be in the form of a non-null JSON string. You need to parse this JSON string to extract the type and payload components.
- Handle Event Types: Based on the type of the event, implement the appropriate logic to process or handle the event.
- Process Payload: Extract and utilize the data from the payload property as needed for your application.
By following these steps, you can effectively integrate and handle the events using the nwCore SDK.