Samsung Mobile Innovator

Samsung Widget API Reference
Version 2.0

About the Widget API This guide is a reference to Samsung Mobile Widget API for Samsung devices. which perform system functions common to all Samsung devices. Example try { } catch(e) { } return widget. the return value is “en” for English.sysInfo. “fr” for French and “de” for German (Deutsche). widget. The language code is a two letter code specified by ISO 639-1.sysInfo. widget.getLanguageList Returns the language code for the language currently configured for the device.getOSInfo(). return null. .getLanguageList(). Return Value Returns language code for example: en/de/fr. return null. For example.sysInfo. The Samsung API.getOSInfo Returns OS information Return Value Returns OS related information for example: SHP/VPP/R5 Example try { } catch(e) { } return widget.sysInfo.. They do not work in a web browser.

widget. Parameters viewID eventID Calendar view need to be displayed.widget.openCalendarDetailWnd Launches / opens system calendar.launchNavigationApp(). "").application.application. Specific event ID can be passed Note: This API is used for Calendar clock and Daily Briefing. it was developed to open only Month view. Example try { widget. alert(“Fail to open”). Example try { } catch(e) { } widget. } catch(e) { } alert(“Fail to open”).openCalendarDetailWnd("Month".launcher.application.launchNavigationApp Launches/opens navigation application installed in the device. so basically.application.launcher. .

window.launcher. . } catch(e) { } alert(“Fail to open”).widget.getCurrentDirection Return current direction of the device. } catch(e) { } return null.application. Return Value Returns current position of the device.memoryStatusView(). Example try { widget. widget.launcher. for example: vertical Example try { return widget.application. User can view all memory related information for the device.memoryStatusView Launches / opens memory status window of the mobile device.window.getCurrentDirection().

(widgetendkey / widgetsleepawakened / widgetlocaltimechanged / infoalarmsettingchange / calendarchange / widgetmodechange) Specify a function to execute when event triggers True/False widgetendkey widgetsleepawakened widgetlocaltimechanged infoalarmsettingchange Calendarchange widgetmodechange : : : : : : Fired when device end key is pressed Fired when device awaking from deep Sleep mode Fired when local time has been changed in device For Changing Daily Briefing Application Setting Fired when we change the schedule Fired when mode changes .widget. Parameters event_name listener_func boolean capture Specify event name.checkIdleStatus Return current idle status information Return Value Returns current idle status info. widget. for example: backgroundappl Example try { return widget. } catch(e) { } return null.checkIdleStatus().addEventListener Registers a single event listener on a target.

widget. } catch(e) { } alert(“Failure”).Example: try { widget. . false). removeEventListener("widgetendkey". false). alert(“Failure”).addEventListener("widgetendkey". onClose. onClose. Parameters event_name listener_func boolean capture / widgetsleepawakened / widgetlocaltimechanged / infoalarmsettingchange / calendarchange / widgetmodechange) Specify event name. (widgetendkey Specify a function to execute when event triggers True/False Example try { } catch(e) { } widget.removeEventListener Allow removal of specified event listeners from the event target.

Example try { } catch(e) { } widget.removeAllEventListeners Allows the removal of all event listeners registered from the event target. Return Value Returns screen size of the device. widget.0.widget. alert(“Failure”).removeAllEventListeners(). } catch(e) { } return null.0 Example try { return widget. . for example: 480.getFullmodeSize().getFullmodeSize Return full mode screen size of the device.762.

Return Value Returns time zone set. . return null.28.getGMT Return time zone set for the device.getIndicatorColor Return indicator color of the device. Return Value Returns RGB value indicator. widget.getGMT().26.1 Example try { return widget. for example: 26.getIndicatorColor(). for example: GMT + 9 Example try { } catch(e) { } return widget. } catch(e) { } return null.widget.

Sign up to vote on this title
UsefulNot useful