语言

Menu
Sites
Language
Calling default e-mail client does not work in Tizen 2.2.1?

Hello,

I just wanted to submit an update for an app and I just realisez that in Tizen 2.2.1 I cannot open the default e-mail client anymore. It worked in Tizen 2.2.0. Here is the code I've used:

     var appControl = new tizen.ApplicationControl(
			 'http://tizen.org/appcontrol/operation/send',
			 null,
			 "text/html",
			 null,
			 [new tizen.ApplicationControlData("http://tizen.org/appcontrol/data/text", [mytext]), new tizen.ApplicationControlData("http://tizen.org/appcontrol/data/subject", ["My Subject"])]
			 );

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

			 console.log("Launch service");
			 
			 tizen.application.launchAppControl(
			 appControl,
			 "org.tizen.email",
			 function() {console.log("launch application control succeed"); },
			 function(e) {console.log('launch appControl failed. Reason: ' + e.name)},
			 serviceCB
			 );

I've tried to change "org.tizen.email" to "vxqbrefica.Email", the native e-mail client opens, but not in the Compose screen, only in Inbox screen.

Any ideas are highly apreciated!

Thanks!

响应

4 回复
Berninger

I hope this code works:

function sendMail(to,subject,body)

    var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/compose",null,null,null,
  [ new tizen.ApplicationControlData("http://tizen.org/appcontrol/data/to",[to]),
    new tizen.ApplicationControlData("http://tizen.org/appcontrol/data/subject",[subject]),
    new tizen.ApplicationControlData("http://tizen.org/appcontrol/data/text", [body]) ] );

....
    tizen.application.launchAppControl(
        appControl, "tizen.email",
        function() {console.log("launch application control succeed"); },
        function(e) {console.log('launch appControl failed. Reason: ' + e.name)},null );    
}

Cristian Loloiu

Thanks!

Using "tizen.email" instead of "org.tizen.email" and "http://tizen.org/appcontrol/operation/compose" operation instead of "send" seems to work!

Alexander AVSukhov

Hello,

Try to use "http://tizen.org/appcontrol/operation/compose" operation instead "send"

Cristian Loloiu

Thanks!

Now it works again.