The Application class is used for accessing or setting application level configuration settings.
This API is part of the coreapi extension that is included automatically.
extensions: ["coreapi"]
Be sure to review the JavaScript API Usage guide for important information about using this API in JavaScript
Be sure to review the Ruby API Usage guide for important information about using this API in Ruby
Path to database file by partition name. Please note that this function does not create a database file. This function only generates the file path based on the application path and partition name.







Parameters
Partition name.
Synchronous Return:
Method Access:
Rho.Application.databaseFilePath(STRING partitionName) Rho::Application.databaseFilePath(STRING partitionName)
Generates the absolute path to database blob file. Please note that this function does not the create database file. This function only generates the file path based on application path and partition name.







Parameters
Relative path to the blob file, as it is stored in the database.
Synchronous Return:
Method Access:
Rho.Application.expandDatabaseBlobFilePath(STRING relativePath) Rho::Application.expandDatabaseBlobFilePath(STRING relativePath)
Minimize or move the application to background. When running in RhoSimulator this method is supported only for Windows OS.




Synchronous Return:
Method Access:
Rho.Application.minimize() Rho::Application.minimize()
Folder of the model by name.







Parameters
Model name.
Synchronous Return:
Method Access:
Rho.Application.modelFolderPath(STRING name) Rho::Application.modelFolderPath(STRING name)
Default processing of an application Event. May be called from setApplicationNotify callback.This method should be called for each event. The only exception is SyncUserChanged, where you can choose your own reset database logic.





Parameters
See setApplicationNotify for applicationEvent values.
Event specific data.
Synchronous Return:
Method Access:
Rho::Application.processApplicationEvent(STRING applicationEvent, HASH eventData)
Quit the application.







Synchronous Return:
Method Access:
Rho.Application.quit() Rho::Application.quit()
Generates the relative path to database blob file. Please note that this function does not create a database file. This function only generates the file path based on the application path and partition name.







Parameters
Absolute path to database blob file.
Synchronous Return:
Method Access:
Rho.Application.relativeDatabaseBlobFilePath(STRING absolutePath) Rho::Application.relativeDatabaseBlobFilePath(STRING absolutePath)
Restores the application to be in the foreground. When running in RhoSimulator the method is supported only for windows OS.




Synchronous Return:
Method Access:
Rho.Application.restore() Rho::Application.restore()
Set application activation/deactivation callback.






Parameters
Async Callback Returning Parameters: HASH
Possible Values :
Event specific data.
Synchronous Return:
Method Access:
Rho.Application.setApplicationNotify(CallBackHandler callback) Rho::Application.setApplicationNotify(CallBackHandler callback)






Property Access:
Rho.Application.appBundleFolder Rho::Application.appBundleFolder






Property Access:
Rho.Application.appName Rho::Application.appName






Property Access:
Rho.Application.appsBundleFolder Rho::Application.appsBundleFolder


Property Access:
Rho.Application.badLinkURI Rho::Application.badLinkURI






Property Access:
Rho.Application.bundleFolder Rho::Application.bundleFolder






Property Access:
Rho.Application.configPath Rho::Application.configPath





Property Access:
Rho::Application.country






Property Access:
Rho.Application.databaseBlobFolder Rho::Application.databaseBlobFolder





Same values as for nativeMenu.
Property Access:
Rho.Application.defaultNativeMenu Rho::Application.defaultNativeMenu





Property Access:
Rho.Application.invalidSecurityTokenStartPath Rho::Application.invalidSecurityTokenStartPath





Property Access:
Rho::Application.locale






Property Access:
Rho.Application.modelsManifestPath Rho::Application.modelsManifestPath





Visible label.
URL to page which will be loaded into tab. It may be path to Ruby controller action; i.e. '/app/Account' would load the Account index action. For ruby callback use 'callback:/app/Account' Or JavaScript method to call: 'javascript: methodOnTab();'. Or path to html page to load.
Property Access:
Rho.Application.nativeMenu Rho::Application.nativeMenu






Property Access:
Rho.Application.publicFolder Rho::Application.publicFolder





Property Access:
Rho.Application.securityTokenNotPassed Rho::Application.securityTokenNotPassed






Property Access:
Rho.Application.settingsPageURI Rho::Application.settingsPageURI






Property Access:
Rho.Application.splash Rho::Application.splash






Property Access:
Rho.Application.startURI Rho::Application.startURI



Property Access:
Rho.Application.title Rho::Application.title






Property Access:
Rho.Application.userFolder Rho::Application.userFolder






Property Access:
Rho.Application.version Rho::Application.version
Rho.Application.setLocale('en') var current_locale = Rho.Application.locale(); alert(current_locale)
Rho::Application.setLocale('en') current_locale = Rho::Application.locale Alert.show_popup(current_locale)
// Get and show the various app folders var appFolder = Rho.Application.appBundleFolder; var appsBundleFolder = Rho.Application.appsBundleFolder; var databaseBlobFolder = Rho.Application.databaseBlobFolder; var publicFolder = Rho.Application.publicFolder; var userFolder = Rho.Application.userFolder; var message = "App bundle folder: "+appFolder+"\n"+ "Apps bundle folder: "+appsBundleFolder+"\n"+ "Database blob folder: "+databaseBlobFolder+"\n"+ "Public folder: "+publicFolder+"\n"+ "User folder: "+userFolder; alert(message);
# Get and show the various app folders appFolder = Rho::Application.appBundleFolder appsBundleFolder = Rho::Application.appsBundleFolder databaseBlobFolder = Rho::Application.databaseBlobFolder publicFolder = Rho::Application.publicFolder userFolder = Rho::Application.userFolder message = "App bundle folder: "+appFolder+"\n"+ "Apps bundle folder: "+appsBundleFolder+"\n"+ "Database blob folder: "+databaseBlobFolder+"\n"+ "Public folder: "+publicFolder+"\n"+ "User folder: "+userFolder Alert.show_popup(message)
Rho.Application.minimize();
Rho::Application.minimize
Rho.Application.quit();
Rho::Application.quit
Rho.Application.restore();
Rho::Application.restore