Mobile Development 10.11 | webMethods Mobile SuiteWeb Help | Using webMethods Mobile Designer | Creating Mobile Application Projects | 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 operating system 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() 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 operating system, onCreateMainWindow() on the NativeUI side will not have been called yet.
Note:
If the getter functionality in Application is still required, it is vital that any overriding method for onStartAppFromURL() or onStartAppFromFile() calls super.onStartAppFromURL() or super.onStartAppFromFile(), respectively.