[Resolved] making a phone call on android galaxy tab 3g

Hello,

i am trying to write a code for making a phone call (android samsung galaxy tab ) , but nothing is happend…

can anyone help me??
Do i need to enable a permission on android for phone calls??
this is my code…

callButton = display.newImageRect(“phone.png”,60,60);
callButton:setReferencePoint( display.CenterLeftReferencePoint );
callButton.x=_W/2+_W/5;
callButton.y=0;

local function makeCall(event)
if event.phase == “ended” then
print(“calling”);
system.openURL(“tel:+302109374470”)
end
return true – important, don’t leave out
end

callButton:addEventListener(“touch”, makeCall)
[import]uid: 185094 topic_id: 31848 reply_id: 331848[/import]

Try this for your function.

what gets printed out in the terminal, calling or call failed?

[lua]local function makeCall(event)
if event.phase == “ended” then
print “calling”
system.openURL(“tel:+302109374470”)
else
print “call failed”
end
return true – important, don’t leave out
end[/lua] [import]uid: 62706 topic_id: 31848 reply_id: 127099[/import]

my problem is solved…

it needed these permissions in build.settings.

“android.permission.CALL_PHONE”,
“android.permission.CALL_PRIVILEGED”,
[import]uid: 185094 topic_id: 31848 reply_id: 127100[/import]

Try this for your function.

what gets printed out in the terminal, calling or call failed?

[lua]local function makeCall(event)
if event.phase == “ended” then
print “calling”
system.openURL(“tel:+302109374470”)
else
print “call failed”
end
return true – important, don’t leave out
end[/lua] [import]uid: 62706 topic_id: 31848 reply_id: 127099[/import]

my problem is solved…

it needed these permissions in build.settings.

“android.permission.CALL_PHONE”,
“android.permission.CALL_PRIVILEGED”,
[import]uid: 185094 topic_id: 31848 reply_id: 127100[/import]