The Get status method allows you to check the status of the Genius mobile pay application before calling it. However, it is possible to call this method at any time as needed. To use this method, you need to have Genius mobile pay version 1.65.0 or higher and the AIDL library version at least 1.20.0.
The "Get status" function runs on a separate service, IGPTomInfoService, independent of the payment and login services; therefore, it is necessary to bind to it separately using the action com.globalpayments.atom.BIND_TO_INFO_SERVICE.
Request [service.getGPTomInfo()]
A one-off query that can be called at any time as needed—it returns the current state of the application.
Response [App2AppInfoResponse]:
LOGGED_IN - the user is logged in
LOGGED_OUT - the user is logged out
street=Prazska
house=10
zip=10100
Continuous monitoring of status
In addition to one-off queries, you can subscribe to status changes—so you don't have to repeatedly query them yourself.
Request [service.registerCallback(callback)]
Po zaregistrování callbacku IGPTomInfoChangedCallback vás Genius mobile pay sám upozorní na každou změnu stavu (přihlášení, odhlášení, změna TID apod.) voláním metody onGPTomInfoChanged(jsonData) — jsonData má stejný formát jako odpověď výše (App2AppInfoResponse).
Before finishing work with the service, do not forget to call service.unregisterCallback(callback).
