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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(String key, Consumer<String> consumer) Adds a listener to the given key, likeRuntimeArgsService.LAUNCH_LOCAL_NOTIFICATION_KEYorRuntimeArgsService.LAUNCH_URL_KEY, so if those occur, the consumer will accept the provided StringvoidWhen 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.voidremoveListener(String key) Removes the listener for the given key
-
Constructor Details
-
DefaultRuntimeArgsService
public DefaultRuntimeArgsService()
-
-
Method Details
-
fire
Description copied from interface:RuntimeArgsServiceWhen 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:
firein 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:RuntimeArgsServiceAdds a listener to the given key, likeRuntimeArgsService.LAUNCH_LOCAL_NOTIFICATION_KEYorRuntimeArgsService.LAUNCH_URL_KEY, so if those occur, the consumer will accept the provided String- Specified by:
addListenerin interfaceRuntimeArgsService- Parameters:
key- a String that the service is expected to receiveconsumer- the operation that will be accepted
-
removeListener
Description copied from interface:RuntimeArgsServiceRemoves the listener for the given key- Specified by:
removeListenerin interfaceRuntimeArgsService- Parameters:
key- a String that the service is expected to receive
-