WebAPI/WebSTK: Difference between revisions

Line 717: Line 717:
   typeOfCommandL command.typeOfCommand,
   typeOfCommandL command.typeOfCommand,
   commandQualifier: command.commandQualifier,
   commandQualifier: command.commandQualifier,
   resultCode : mozICC.STK_RESULT_OK;
   resultCode : mozICC.STK_RESULT_OK,
   // 'id' is got from the chosen item identifier (menu.item[].identifier)
   // 'id' is got from the chosen item identifier (menu.item[].identifier)
   itemIdentifier: id
   itemIdentifier: id
Line 737: Line 737:
// onTextInput is the callback when user inputs complete.
// onTextInput is the callback when user inputs complete.
function onTextInput(input) {
function onTextInput(input) {
   var response = new MozStkResponse(command.number, command.type, command.qualifier);
   var response = {
  response.resultCode = MozStkResponse.RESULT_OK;
     commandNumber: command.commandNumber,
  response.input = input;
     typeOfCommandL command.typeOfCommand,
  mozIcc.sendStkResponse(response);
    commandQualifier: command.commandQualifier,
}
    resultCode : mozICC.STK_RESULT_OK,
</pre>
    input: input
 
   };
== Set Up Call ==
<pre>
mozIcc.onstkcommand = function (command) {
  switch (command.type) {
     case MozStkCommand.CMD_SET_UP_CALL:
      var call = command.call;
      // create a Text Message UI to ask user confirmation
      // for make the MO call.
     break;
  }
};
 
// onUserConfirm is the callback when user confirms the call.
function onUserConfirm(confirm) {
  var response = new MozStkResponse(command.number, command.type, command.qualifier);
  response.resultCode = MozStkResponse.RESULT_OK;
   response.confirmation = confirm;
   mozIcc.sendStkResponse(response);
   mozIcc.sendStkResponse(response);
}
}
Confirmed users
266

edits