[SOLVED] D60 Phone API Example Applications Not Working

Hello all,

We’ve purchased a D60 for evaluation and are trying out the application API on the phone. We’re able to load applications on the phone and have gotten “Hello World” up and running.

We moved over to “bigclock” (downloaded from the Phone API samples page) but are having less luck. After installing the application, we get the following errors in syslog:

[ae] bigclock: /nvdata/jsapps/bigclock/startup.js:23: Error: invalid color
[ae] bigclock: group.color = ‘black’;

If we comment out the “group.color” line, it does run, but the background is grey. If I debug the value of group.color, I get “bgcolor”.

Reading the API docs for Widget (Group’s parent class):

http://phones.digium.com/phone-api/reference/javascript-modules/widget-base-class

They list “white” and “black” as the values for the color property. However, neither of these work. There is also no mention of the “bgcolor” value, which seems to be the only one that works.

Is there a different API reference I should be using?

Thanks!

Howdy,

It’s the right location, it just needs a number of updates that are D6x specific.

The following colors should be available:

bgcolor - main background color (grey 900)
fgcolor - main foreground text color (grey 200)
titlebgcolor - title background (blue title bar)
titlefgcolor - title foreground (white title bar text)
selectbgcolor - select background (light blue select bar)
selectfgcolor - select foreground (dark select text grey 900)
modalbgcolor - dark grey modal background (grey 800)
errorbgcolor - error background (red)
errorfgcolor - error foreground (white text)
fieldbgcolor - input field default background (light grey 300)
fieldfgcolor - input field default foreground (dark text grey 900)
tablfg2color - table 2 text medium dark grey (grey 500)
tablfg3color - table 3 text medium light grey text (grey 400)
tablfg4color - table 4 text red (red 900 also matches red softkey)
tablbdrcolor - table border color (dark grey border lines grey 700)
skdialcolor - soft key green dial color (green 900)
skerasecolor - soft key red delete color (red 900)

Cheers

Thank you for that!

Alas, we made our own wallpaper that’s black; pity that isn’t one of the colors (or transparent…) Is there any reason to restrict the color palette?

You mentioned “a number of updates” for the D6X documentation. Are there any other big ones I should know about so we don’t bump into them? Or, is there a planned release of updated API docs?

Thanks again!

Making the UI configurable to any color for any element is more work with what is currently a non-specific return on such work. :smiley:

Fair enough. I humbly request that “black” be added as one of the colors you officially support, if only for compatibility with the older API.

Thanks!

That may not go well given that the screen itself is black. I’ve added the colors to the public docs, and we’ve moved the public docs over to the wiki:

https://wiki.asterisk.org/wiki/display/DIGIUM/Phone+API+Documentation

and I think I got the updated app examples plugged in to the demo pages.