Installing and using Mobile Suite : Using webMethods Mobile Designer : Coding a Mobile Application : Registering Applications for Data Sharing (custom URIs and MIME-types) : Handling Data Sharing Events
Handling Data Sharing Events
When the application is asked by the OS to handle data sharing, either Application.onStartAppFromURL(String scheme, String url) or Application.onStartAppFromFile(String mimeType, String absolutePath) will be called. These calls react to user interaction coming from outside the application, and may occur at any point in the application's lifecycle.
The default implementations of onStartAppFromURL() and onStartAppFromFile() will store the incoming data and allow it to be queried through getters in the base Application class.
Alternatively, it is possible to override onStartAppFromURL and onStartAppFromFile from a class that extends Application. Doing so will ensure that the application is notified directly. At this point, standard Java classes are available for use. If the application has been started by the OS, then onCreateMainWindow() on the NativeUI side will not have been called yet.
Note:  
If the getter functionality in Application is still required, then it is vital that any overriding method for onStartAppFromURL() or onStartAppFromFile() calls super.onStartAppFromURL() or super.onStartAppFromFile(), respectively.
Copyright © 2007-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback