Samsung Electronics logo

Launching Applications with Alarms



Learning how to launch application with alarms is a basic alarm management skill:

  1. To launch an application explicitly when an alarm is triggered, you must define the application as a parameter in the add() method used to add the created alarm to the system:

    /* Run the browser */
    var alarm = new webapis.AlarmAbsolute(new Date(2012, 10, 4, 8, 0));
    webapis.alarm.add(alarm, "http://samsungapps.com/browser"); 
    
  2. To launch an application implicitly when an alarm is triggered, you must use the application control and define the required arguments as a parameter in the add() method used to add the created alarm to the system:

    /* Run the browser and open the defined browser page with the operation/view application control */
    
    var alarm = new webapis.AlarmAbsolute(new Date(2012, 10, 4, 8, 0));
    var appControl = new webapis.ApplicationControl("http://samsungapps.com/appcontrol/operation/view",
                                                              "http://samsungapps.com");
    
    webapis.alarm.add(alarm, "http://samsungapps.com/browser", appControl);