APPCOMMON
Class for the basic TV Commands (for example, Key Registration, and so on).
Add the following line for AppCommon class into a html file your own : <object id="plugin" classid="clsid:SAMSUNG-INFOLINK-SEF" style="width:0px; height:0px;"></object> |
You can declare AppCommon class like this : ex) plugin = document.getElementById("plugin"); plugin.Open('AppCommon', '1.001', 'AppCommon'); plugin.Execute('method', 'parm1', 'parm2'); |
Constants
Name | Value | Description |
PL_APPCOMMON_MESSAGE_APP_DEACTIVE | 0 | The App is deactivated |
PL_APPCOMMON_MESSAGE_APP_ACTIVE | 1 | The App is activated |
PL_APPCOMMON_MESSAGE_APP_INITIALIZED | 2 | The App is initialized |
PL_APPCOMMON_MESSAGE_START_XLET_BY_APPLIST | 3 | An xlet is started by Application list |
PL_APPCOMMON_MESSAGE_TIMEZONE_CHANGED | 4 | The time zone is changed by Menu Application |
PL_APPCOMMON_MESSAGE_XLET_SHOW_STATE_CHANGE | 5 | The xlet show state changed |
PL_APPCOMMON_MESSAGE_JAM_INITIALIZED | 6 | The App is jam initialized |
PL_APPCOMMON_MESSAGE_CHANGE_TV_MODE_START | 7 | Change TV mode start |
PL_APPCOMMON_MESSAGE_CHANGE_BURNPROOF_TIME | 8 | Change Burnproof Time |
PL_APPCOMMON_MESSAGE_CHANGE_DATASERVICE_AUTO_LAUNCH | 9 | Change DataService Auto launch |
PL_APPCOMMON_MESSAGE_NOTIFY_BANNER_HIDE | 10 | Notify banner hide |
PL_APPCOMMON_MESSAGE_DATASERVICE_PREPARE | 11 | Data Service prepare |
PL_APPCOMMON_MESSAGE_DATASERVICE_RECEIVE | 12 | Data Service Receive |
PL_APPCOMMON_MESSAGE_DATASERVICE_ERROR | 13 | Data Service Error |
PL_APPCOMMON_MESSAGE_DATASERVICE_HIDE | 14 | Data Service Hide |
PL_APPCOMMON_MESSAGE_POWER_ON_FROM_STANDBY | 15 | The power on from standby mode |
PL_APPCOMMON_MESSAGE_POWER_ON_BY_WAKEUP_UPGRADE | 16 | The power on by wakeup upgrade |
PL_APPCOMMON_MESSAGE_POWER_ON_BY_WAKEUP_STANDBY | 17 | The power on by wakeup standby |
PL_APPCOMMON_MESSAGE_NOTIFY_POWER_OFF | 18 | Notify Power off |
PL_APPCOMMON_MESSAGE_RESET_TIME | 19 | The TCTv::EVENT_INITIALIZE_TIME received by TVViewer |
PL_APPCOMMON_MESSAGE_CHANGE_CHILDLOCK | 20 | The child lock state change |
PL_APPCOMMON_MESSAGE_CHANGE_RATING_BLOCK | 21 | The rating block state change |
PL_APPCOMMON_MESSAGE_CHANGE_AUDIO_LANGUAGE | 22 | The audio language change |
PL_APPCOMMON_MESSAGE_INPUT_OCCUR | 23 | The key input event. The Callback data format is [xxxxxxxx/yyyyyyyy x..:MessageID y..:Key |
PL_APPCOMMON_MESSAGE_SWD_START | 24 | The SWD is start |
PL_APPCOMMON_MESSAGE_SWD_END | 25 | The SWD is end |
PL_APPCOMMON_MESSAGE_SWD_START_YES | 26 | The SWD is start YES |
PL_APPCOMMON_MESSAGE_SWD_START_NO | 27 | The SWD is start NO |
PL_APPCOMMON_MESSAGE_CC_DATA_SUBSCRIBE | 28 | The CC DATA SUBSCRIBE |
PL_APPCOMMON_MESSAGE_CC_DATA | 29 | The CC DATA |
PL_APPCOMMON_MESSAGE_AUTO_MOTION_DEMO_ON | 30 | The Auto Motion Plus 120Hz demo start |
PL_APPCOMMON_MESSAGE_AUTO_MOTION_DEMO_OFF | 31 | The Auto Motion Plus 120Hz demo off |
PL_APPCOMMON_MESSAGE_MOVIE_PLUS_DEMO_ON | 32 | The Movie Plus demo start |
PL_APPCOMMON_MESSAGE_MOVIE_PLUS_DEMO_OFF | 33 | The Movie Plus demo off |
PL_APPCOMMON_MESSAGE_REAL_DEMO_ON | 34 | The Real Demo start |
PL_APPCOMMON_MESSAGE_REAL_DEMO_OFF | 35 | The Real Demo off |
PL_APPCOMMON_MESSAGE_LED_DEMO_ON | 36 | The Led Demo on |
PL_APPCOMMON_MESSAGE_LED_DEMO_OFF | 37 | The Led Demo off |
PL_APPCOMMON_MESSAGE_SMOOTHMOTION_DEMO_ON | 38 | The SMOOTHMOTION Demo on |
PL_APPCOMMON_MESSAGE_SMOOTHMOTION_DEMO_OFF | 39 | The SMOOTHMOTION Demo off |
PL_APPCOMMON_MESSAGE_WAKEUP_UPGRADE_START | 40 | The WakeUp UpGrade Start |
PL_APPCOMMON_MESSAGE_POWER_OFF_START | 41 | The Power Off Start |
PL_APPCOMMON_MESSAGE_REMIND_RECORD | 42 | The Remind Record |
PL_APPCOMMON_MESSAGE_IME_INPUT_WAIT_START | 43 | The IME Iput wait Start |
PL_APPCOMMON_MESSAGE_IME_INPUT_WAIT_END | 44 | The IME Iput wait end |
PL_APPCOMMON_MESSAGE_IME_INPUT | 45 | The IME Iput |
Listeners
OnMessage | ||
Description | ||
The OnMessage plugin event is called when the PL_APPCOMMON message is received from the AppCommon plugin. | ||
Parameters | ||
data | Number | PL_APPCOMMON_MESSAGE xxxxxxxx[/yyyy] x.. : MessageID, yyyy : Optional data |
Emulator Support | ||
SDK Constraint | ||
Example | ||
function OnLoadFunc() { SefPlugin = document.getElementById('PluginSef'); SefPlugin.Execute("SubscribeEvent", PL_APPCOMMON_MESSAGE_INPUT_OCCUR); SefPlugin.OnEvent = OnEvent; } function OnUnloadFunc() { SefPlugin.Execute("UnsubscribeEvent" |
Methods
SubscribeEvent | ||
Description | ||
The SubscribeEvent function registers message to receive callback. | ||
Parameters | ■message - PL_APPCOMMON_MESSAGE - Message to register, PL_APPCOMMON_MESSAGE plugin enumeration defines the common messages. | |
Return | ■Success - positive value ■Fail - negative value | |
Emulator Support | Y | |
SDK Constraint | None | |
Example | ||
SefPlugin.Execute("SubscribeEvent", PL_APPCOMMON_MESSAGE_INPUT_OCCUR); SefPlugin.Execute("UnsubscribeEvent", PL_APPCOMMON_MESSAGE_INPUT_OCCUR); function OnEvent(event, data1, data2) { alert("OnEvent event=[" + event + "]"); if (event == PL_APPCOMMON_MESSAGE_IME_INPUT) { alert('PL_APPCOMMON_MESSAGE_IME_INPUT'); document.getElementById('OnEvent').value = "[" + data1 + "]"; } } |
UnsubscribeEvent | ||
Description | ||
The UnsubscribeEvent function unregisters the message to receive callback. | ||
Parameters | ■message - PL_APPCOMMON_MESSAGE - Message to unregister, PL_APPCOMMON_MESSAGE plugin enumeration defines the common messages. | |
Return | ■Success - positive value ■Fail - negative value | |
Emulator Support | Y | |
SDK Constraint | None | |
Example | ||
SefPlugin.Execute("UnsubscribeEvent",PL_APPCOMMON_MESSAGE_INPUT_OCCUR); |