Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

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

app

Loads and saves standard settings that can be later accessed and used across the application by other modules, screens, etc. Note: the app should always have its init() method called after being included.

Require Extended Library: 

var app = require('app');
app.init();

Methods

Name 

Description 

app.checkRequired

Takes a parameters object and a required keys array and compares the two. If any keys are missing from the array, then an error is logged and the error screen is shown (app.showErrors).

app.getAuth

Returns a reference to the automatically instantiated Auth object that is created when app.init is called.

app.getConfig

Returns an object that contains this app's various settings including id, settings, and account. These are parsed from the app's XML in the phone configuration's appconfig section.

app.init

Initializes the app object. Important: this should be done immediately after including the app library for consistent results. 

app.refreshConfig

Reloads your appconfig and makes a new Auth object.

app.showErrors

Clears the screen and shows an error popup on the entire screen. Takes an array of error messages so you can show multiple messages at one time.

app.t

Returns the translated string of the specified language key. 

Properties

Name 

Description 

app.images

Automatically instantiated Image UI objects when app is required. 

Basic Example:

app.images.softKeys.left; // returns left arrow Image object
app.images.softKeys.right; // returns left arrow Image object
app.images.softKeys.up; // returns left arrow Image object
app.images.softKeys.down; // returns left arrow Image object
app.images.softKeys.select; // returns the check mark image
app.images.softKeys.cancel; // returns left x cancel image

These most likely useful for creating apps with standarized softkeys. See  setSoftKeyIcon  for setting softKey icons on your widgets.

  • No labels