Class TimeoutLockService
-
- All Implemented Interfaces:
public abstract class TimeoutLockService extends MobileService
Represents the abstract service to handle the case that when the app is put into background and brought up to the foreground, how to handle the timeout passcode policy.
-
-
Field Summary
Fields Modifier and Type Field Description private Application
application
private String
apiKey
-
Constructor Summary
Constructors Constructor Description TimeoutLockService()
-
Method Summary
Modifier and Type Method Description final TimeoutLockService
startService()
final TimeoutLockService
stopService()
Unit
onStateChange(ApplicationState state)
When receiving 'onFront' or 'cct visible' states, just add them into visibleStack with the function of addStatus, the function will validate the states. abstract Unit
onForeground()
Represents the state handler when the app is brought up to the foreground abstract Unit
onBackground()
Represents the state handler when the app is brought up to the background final Unit
updateLockState(Boolean locked)
Updates the 'lock' state of the app. final Boolean
isServiceStarted()
The status of the timeout lock service final static Boolean
pause()
Pauses the timeout service, return 'true' if it was started before, 'false' otherwise. final static Unit
resume()
Resumes the timeout service. final static Unit
updateApplicationLockState(Boolean locked)
Updates the application lock state based on the client code needs. final static Unit
updateOnetimeTimeoutSetting(Integer timeoutLockTime)
Customizes the timeout settings in timeoutLockTime milliseconds, this setting will be used only once when the app is put into the background. -
Methods inherited from class com.sap.cloud.mobile.foundation.mobileservices.MobileService
enableNetworkPolicy, getApiKey, getApplication, init, isApplicationInitialized, mayStartNewProcess, reset, setApiKey, setApplication
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
startService
final TimeoutLockService startService()
-
stopService
final TimeoutLockService stopService()
-
onStateChange
Unit onStateChange(ApplicationState state)
When receiving 'onFront' or 'cct visible' states, just add them into visibleStack with the function of addStatus, the function will validate the states.
-
onForeground
abstract Unit onForeground()
Represents the state handler when the app is brought up to the foreground
-
onBackground
abstract Unit onBackground()
Represents the state handler when the app is brought up to the background
-
updateLockState
final Unit updateLockState(Boolean locked)
Updates the 'lock' state of the app.
-
isServiceStarted
final Boolean isServiceStarted()
The status of the timeout lock service
-
pause
final static Boolean pause()
Pauses the timeout service, return 'true' if it was started before, 'false' otherwise.
-
resume
final static Unit resume()
Resumes the timeout service.
-
updateApplicationLockState
final static Unit updateApplicationLockState(Boolean locked)
Updates the application lock state based on the client code needs. For example, when starting the onboarding or restore flows from the launcher activity, it can call this to 'lock' the app, then go through the restore process.
-
updateOnetimeTimeoutSetting
final static Unit updateOnetimeTimeoutSetting(Integer timeoutLockTime)
Customizes the timeout settings in timeoutLockTime milliseconds, this setting will be used only once when the app is put into the background. If timeoutLockTime is a minus value, disable the timeout service once.
If no TimeoutLockService which implemented onetimeTimeoutSetting was initialized by SDKInitializer, this call does nothing.
-
-
-
-