Launch a Tizen email composing dialog

Launch a Tizen email composing dialog

BY 04 Apr 2013 Web Application Development

I am looking for the correct way of showing an email composition dialog, with the “to” field already initialized, from a web app. There is no relevant Web API documentation, so I tried to deduce the correct code from the Native app documentation. Unfortunately, I have not achieved a consistent result. I tried the code pasted below, with the following appIds:

  • org.tizen.email
  • tizen.email
  • vxqbrefica.Email
  • null

and the following operations:

  • http://tizen.org/appcontrol/operation/compose
  • http://tizen.org/appcontrol/operation/send

All the above options have different outcomes. In some, the dialog is shown, but the “to” field is empty. In some, everything works in the emulator, but not on a hardware Tizen phone. In other words, neither combination results in a dialog having been shown AND the “to” field having been initialized, in BOTH emulator and a hardware Tizen device.

Tizen SDK version is 2.0.0 (released in March). The device runs Tizen 2.0.0. The code is below:

———————————————————–

function launch(appId) {
    service = new tizen.ApplicationControl(
        ‘http://tizen.org/appcontrol/operation/send’,
        null,
        null,
        null,
        [new tizen.ApplicationControlData(‘to’, [‘foo@bar.com’])]
    );

    serviceCB = {
        onsuccess: function () {
            console.log(‘OK’)
        },
        onfailure: function () {
        }
    };

    tizen.application.launchAppControl(
        service,
        appId,
        function() {},
        function(e) {Ti.API.error(‘launch appControl failed. Reason: ‘ + e.name)},
        serviceCB
    );
}
 

Written by