언어 설정

Menu
Sites
Language
make call from a gear2

Hello,

I am trying to initiate a call from a gear2 when an event is triggered (or a button clicked).

Here is the code I used :

        console.log("Preparing to launch the call");

    	var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/call","tel:0102030405", null, null, null);

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

Here is the log I am getting : 

js/main.js (103) :Preparing to launch the dialer..

js/main.js (109) :launch appControl failed. Reason: NotFoundError

What am I doing wrong ? I put the application control privilege in the config.xml like this :

<tizen:privilege name="http://tizen.org/privilege/application.launch"/>

But I am still getting this error.

 

Thank you in advance :)

M.

Responses

3 댓글
Thijs Mergaert

Hi,

The documentation says:

The ErrorCallback() is launched with these error types:

NotFoundError - If system cannot find the application that matches the specified application control.
InvalidValuesError - If any of the input parameters contain an invalid value.
UnknownError: If any other error occurs.

The NotFoundError appears to indicate that there is no application on the device that can perform the 'call' operation.  Are you running this on an emulator, or a physical device?

Sincerely yours,

Thijs Mergaert

Massimo Massimo Zambelli

Hello,

Thank you for your response. 

I am running this on a physical Gear2 Lite, connected to a Galaxy S5, with the Gear Manager installed and configured.

I tried with a sim card as well, but still getting this NotFoundError. 

Maybe is there another way? I am trying to launch a call the same way than the contact application on the Gear2.

 

Thanks,

M

Marco Buettner

The Gear 2 (Neo) has no SIMCard support and also you cannot start a call directly via API. You can make to send a 'call request' to your HostApp via SAP and start the call on your S5