Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Highlighted
New Member
Posts: 1
Registered: ‎04-15-2014
My Device: Q10
My Carrier: drei.at
Accepted Solution

Invoke Phone and dial a number without user confirmation

Hi Forum,

I'm trying to initiate a phone call from within a Webworks HTML5 app. I don't want to use something like ... because it shows up a confirmation dialog which has to be confirmed on the phone. I want to initiate the call without any further user interaction. Is this possible with the Webworks Framework?

This is my code:

function docall() {
	blackberry.invoke.invoke(
		{
			type: "application/vnd.blackberry.phone.startcall",
			action: "bb.action.DIAL",
			data: "{'number': '0123456789'}"
		},
		onSuccess,
		onError
	);
}

function onSuccess() {
	console.log("Success");
}
			
function onError(error) {
	console.log("Error: " + error);
}


I tried some alternatives for the data attribute like sending it via the uri attribute:
uri: "data://local?number=0123456789"

Nothing really works. The onSuccess callback is called, and it only opens the phone app, but no number is dialed. It just shows the last calls (probably because thats the first screen in the phone app).

 

Is there something left? Can a webworks app dial a number without further user interaction?

BlackBerry Development Advisor
Posts: 762
Registered: ‎10-01-2009
My Device: All
My Carrier: N/A

Re: Invoke Phone and dial a number without user confirmation

As far as I'm aware the user must confirm a phonecall. Otherwise a developer could have the user dial any phone number they wanted.