Phone API Reference - Core - digium.app

Desk Phone API features described in this section are deprecated and supported only on the following models: D40, d45, d50, d60, d62, d65, d70

digium.app

Contains methods and properties about the phone's applications.

Methods

Name 

Description 

Name 

Description 

digium.app.getIcon

Returns the current Image object for the specified app.

digium.app.getInfo

Returns an object with information about the specified app, as defined in its app.json file.

digium.app.getList

Returns an array containing the names of apps that the system knows about. The names are defined in app.json.

 

Properties

Name 

Description 

Name 

Description 

digium.app.config.xml

A string containing the XML representing the app's configuration (appconfig) settings from the phone's master configuration xml. These are limited to app-specific settings distributed from the phone's configuration server.

Basic Example:

digium.app.config.xml; //returns '<appconfig id="test.my_app"><settings /></appconfig>'

digium.app.exitAfterBackground

An app will start up each time it is placed in the foreground and shut down each time it is placed in the background. This Boolean property sets whether or not the app shuts down (exits) when it goes into the background. The default setting is true; i.e., the app shuts down when it goes into the background. Change the setting to false to make your app run persistently.  

Basic Example:

digium.app.exitAfterBackground = false; //now it won't shut down when backgrounded

digium.app.iconFile

Get or set the filename of the icon image used for this application. The icon is used in other apps such as the app manager screen and is contained in the app's directory.

Basic Example:

// Let's assume your app.json file inits your app with the iconFile "myapp_no_msgs.png"; var currentIcon = digium.app.iconFile; // returns "my_app_no_msgs.png";    // Your app then may be running in the background and when it gets a message you want to  // update the iconFile to provide an indicator to the Apps screen. // this could be set in some sort of call back function digium.app.iconFile = "my_app_msgs_waiting.png";    // now if you go to the Apps screen (press the Apps button on the D70) you will see the icon has changed.    currentIcon = digium.app.iconFile; // returns "my_app_msgs_waiting.png";

If your app is initialized for the first time, digium.app.iconFile is set to the iconFile from the app.json file. If setting the iconFile, the {MODEL}.iconFile naming convention should be used for whichever iconFile you are setting. 

digium.app.idleWindowShown 

Boolean flag reflecting whether the the app's idle screen window is currently displayed.

digium.app.inForeground 

Boolean value indicating whether this app is in the foreground.

digium.app.name 

Get the name of the app as specified in the app's app.json file.

 

Return to Documentation Home I Return to Sangoma Support