Class DefaultRuntimeArgsService
java.lang.Object
com.gluonhq.attach.runtimeargs.impl.DefaultRuntimeArgsService
- All Implemented Interfaces:
RuntimeArgsService
- Direct Known Subclasses:
AndroidRuntimeArgsService
,DesktopRuntimeArgsService
,IOSRuntimeArgsService
-
Field Summary
Fields inherited from interface com.gluonhq.attach.runtimeargs.RuntimeArgsService
LAUNCH_LOCAL_NOTIFICATION_KEY, LAUNCH_PUSH_NOTIFICATION_KEY, LAUNCH_URL_KEY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(String key, Consumer<String> consumer) Adds a listener to the given key, likeRuntimeArgsService.LAUNCH_LOCAL_NOTIFICATION_KEY
orRuntimeArgsService.LAUNCH_URL_KEY
, so if those occur, the consumer will accept the provided Stringvoid
When the app is launched externally, this method is called to identify the key based on the service that is responsible, and the value associated to this key.void
removeListener
(String key) Removes the listener for the given key
-
Constructor Details
-
DefaultRuntimeArgsService
public DefaultRuntimeArgsService()
-
-
Method Details
-
fire
Description copied from interface:RuntimeArgsService
When the app is launched externally, this method is called to identify the key based on the service that is responsible, and the value associated to this key. Typically the developer won't need to call this method for certain services that will launch the app from a Local Notifications or a custom URL.- Specified by:
fire
in interfaceRuntimeArgsService
- Parameters:
key
- a String that the service is expected to receivevalue
- a String that the service will process when the key is received
-
addListener
Description copied from interface:RuntimeArgsService
Adds a listener to the given key, likeRuntimeArgsService.LAUNCH_LOCAL_NOTIFICATION_KEY
orRuntimeArgsService.LAUNCH_URL_KEY
, so if those occur, the consumer will accept the provided String- Specified by:
addListener
in interfaceRuntimeArgsService
- Parameters:
key
- a String that the service is expected to receiveconsumer
- the operation that will be accepted
-
removeListener
Description copied from interface:RuntimeArgsService
Removes the listener for the given key- Specified by:
removeListener
in interfaceRuntimeArgsService
- Parameters:
key
- a String that the service is expected to receive
-