[Tizen Application-dev] How to use Application Control? [object WebAPIError] when using code from documentation

Anatoliy Odukha anatoliy.odukha at globallogic.com
Tue Feb 26 17:05:13 GMT 2013


Hi all,
I am trying to use Application Control to pick images.
There is code for this in documentation
https://developer.tizen.org/help/index.jsp?topic=%2Forg.tizen.web.appprogramming%2Fhtml%2Fguide%2Fsys_guide%2Fsysteminfo.htm

var appControl = new tizen.ApplicationControl("
http://tizen.org/appcontrol/operation/pick", null, "image/*");
var appControlReplyCB =
{
   // Reply is sent if the requested operation is successfully delivered
   onsuccess: function(reply)
   {
      for (var num = 0; num < reply.data.length; num++)
      {
         console.log("reply.data["+num+"].key = "+ reply.data[num].key);
         console.log("reply.data["+num+"].value = "+
reply.data[num].value);
      }
   }
}
tizen.application.launchAppControl(appControl, null,
  function(){console.log("launch appControl succeeded");},
  function(e){console.log("launch appControl failed. Reason: " + e.name);},
  appControlReplyCB);

Aslo I added to config.xml:
<tizen:app-control>
<src name="index.html"/>
<tizen:operation name="http://tizen.org/appcontrol/operation/pick"/>
<mime name="*/*"/>
</tizen:app-control>
<tizen:privilege name="http://tizen.org/privilege/application.launch"/>
<tizen:privilege name="http://tizen.org/privilege/application.read"/>

As result nothing happens, just :[object WebAPIError]  message in console

Any Ideas how to get  this code working?


Thank you
Anatoliy Odukha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tizen.org/pipermail/application-dev/attachments/20130226/9886637e/attachment.html>


More information about the Application-dev mailing list