Skip to main content

Interface IPolyAppCallBacks

com.poly.polyos.app

Interface IPolyAppCallBacks


public interface IPolyAppCallBacks

Callback interface that the client app implements and provides to PolyOS when it registers with it using PolyOsManager.

PolyOS uses this callback to query the AppState of the client app (using getAppState()) and to register a listener using (registerAppStateListener(IPolyAppListener)) to get further app state changes.

App States

AppState represents the global state of the App. The following diagram shows different triggers that changes different flags within the AppState. App States

Since:
3.0.11

See Also: IPolyAppListener, AppState

Method Summary

Modifier and TypeMethod and Description
AppStategetAppState()
Returns the AppState of the application
IPolySettingsServicegetSettingsService()
Returns an implementation of IPolySettingsService, which PolyOS can use to get or set settings on the client app
voidregisterAppStateListener(IPolyAppListener listener)
PolyOS calls this to register an IPolyAppListener with the client app.
voidunRegisterAppStateListener(IPolyAppListener listener)
Unregisters an IPolyAppListener

Method Detail

getSettingsService

IPolySettingsService getSettingsService()
Returns an implementation of IPolySettingsService, which PolyOS can use to get or set settings on the client app

getAppState

AppState getAppState()
Returns the AppState of the application

registerAppStateListener

void registerAppStateListener(IPolyAppListener listener)
PolyOS calls this to register an IPolyAppListener with the client app.
The client app should notify PolyOS of any of its AppState changes using this listener.

unRegisterAppStateListener

void unRegisterAppStateListener(IPolyAppListener listener)
Unregisters an IPolyAppListener