App class is a global data set which defines the content in the module handled by StormContent.
This class is used when loading pages or finding out what type a page is before loading it to prevent
having to load up a whole file to decide what to do with it. This is primarily used with
IntentFactory
to decide what fragment/activity to load for a page Uri or name.
This class also has a vector Uri which tells you what the first page should be when starting the app.
You must load/create this class in your application singleton to prevent it from being cleared
from memory whilst the app is still open.
Example load
String appUri = "assets://app.json"; // This can be anything, it is loaded and dealt with by the FileFactory defined in UiSettings
App app = UiSettings.getInstance().getViewBuilder().buildApp(Uri.parse(appUri));
if (app != null)
{
UiSettings.getInstance().setApp(app);
}