New Run-Time Classes
In order to use New Run-Time classes, you have to add the following line into the _defaults_.xml file:
<property name="project.runtime.uses.nativeui.phoney" value="true"/>
Note: | This property will be set to true by default in the next release. |
com.softwareag.mobile.runtime.core.MDApplication
The
MDApplication class contains the minimal functionality to start an application and should be used in all new projects. The old projects which use the deprecated
Application class should be refactored. For detailed information on
New Run-Time classes, refer to
Migration to the New Run-Time based on the _NativeUIDemo_
example. The
MDApplication class is the application’s entry point. You have to subclass it in order to start an application. You can override the
init() method to initialize some resources or variables. This method will be called only once just after the
MDApplication instance has been created. If you override this method you have to call
super.init() to initialize internal bits by
MDApplication.
In order to provide your own content, you have to override the getMainWindow() method and return a new nUIWindowDisplay object with the views you want to show.
In contrast to the old runtime, the new runtime does not spawn any additional thread. Instead, it uses a native main thread in which the particular application has been started. All Mobile Designer callbacks will be called on this main thread. You should return as fast as possible, to avoid UI freezes. All CPU-intensive tasks or tasks that wait for response, should be executed asynchronously. To run tasks asynchronously, you can use runAsync methods provided in the MDApplication class.
The MDApplication class resides in the nativeUI library and it assumes that natveUI library will be used in the project.
com.softwareag.mobile.runtime.core.IMDApplicationListener
Use this listener to get informed about application state changes. You can register this listener in the MDApplication class. Please check out the Javadoc to see what information you will get.
Deprecated Run-Time classes
The New Run-Time deprecates the following classes:
All this classes will be removed in the next release.