Phone call not working?

Hi,

I’m developing an app, and I need user to be able to call a phone number.

I’m using:
system.openURL(“tel:12345678”) -->fake phone number

In simulator, it tries to open Skype to make the call…

When I compile it for android, nothing happend.
I have a Moto G, with android 4.3… do I have missing something?

Thanks in advance :slight_smile:

What is console output when you debug?

My code looks like this:

    print(“calling…”)

    system.openURL(“tel:12345678”)

Nothing is shown about it… this is the log from android device:

03-18 15:59:10.783 30207 30224 V Corona  : > Class.forName: network.LuaLoader

03-18 15:59:10.783 30207 30224 V Corona  : < Class.forName: network.LuaLoader

03-18 15:59:10.784 30207 30224 V Corona  : Loading via reflection: network.LuaLo

ader

03-18 15:59:10.876 30207 30224 V Corona  : > Class.forName: CoronaProvider.licen

sing.google.LuaLoader

03-18 15:59:10.876 30207 30224 V Corona  : < Class.forName: CoronaProvider.licen

sing.google.LuaLoader

03-18 15:59:10.885 30207 30224 V Corona  : Loading via reflection: CoronaProvide

r.licensing.google.LuaLoader

03-18 15:59:10.893 30207 30224 I Corona  : calling…

–< Nothing below >–

Any suggestion?

Permission?

Do you know wich permission do i need?

EDIT: I found it :slight_smile:
Permission needed is:
android.permission.CALL_PHONE

Thank you for your help! :slight_smile:

Glad you found it :wink: (never used calling service so wasn’t sure)

03-18 15:59:10.893 30207 30224 I Corona : calling...

It was the hint - it was trying to do it but couldn’t finish :slight_smile:

What is console output when you debug?

My code looks like this:

    print(“calling…”)

    system.openURL(“tel:12345678”)

Nothing is shown about it… this is the log from android device:

03-18 15:59:10.783 30207 30224 V Corona  : > Class.forName: network.LuaLoader

03-18 15:59:10.783 30207 30224 V Corona  : < Class.forName: network.LuaLoader

03-18 15:59:10.784 30207 30224 V Corona  : Loading via reflection: network.LuaLo

ader

03-18 15:59:10.876 30207 30224 V Corona  : > Class.forName: CoronaProvider.licen

sing.google.LuaLoader

03-18 15:59:10.876 30207 30224 V Corona  : < Class.forName: CoronaProvider.licen

sing.google.LuaLoader

03-18 15:59:10.885 30207 30224 V Corona  : Loading via reflection: CoronaProvide

r.licensing.google.LuaLoader

03-18 15:59:10.893 30207 30224 I Corona  : calling…

–< Nothing below >–

Any suggestion?

Permission?

Do you know wich permission do i need?

EDIT: I found it :slight_smile:
Permission needed is:
android.permission.CALL_PHONE

Thank you for your help! :slight_smile:

Glad you found it :wink: (never used calling service so wasn’t sure)

03-18 15:59:10.893 30207 30224 I Corona : calling...

It was the hint - it was trying to do it but couldn’t finish :slight_smile:

Hi,

I’m sorry to resurrect an old topic but I too am struggling with making a phone call.

I use system.openURL(“tel:1234567890”) but the only response I get is:

2014-08-26 12:01:06.096 Corona Simulator[329:507]
Copyright © 2009-2014  C o r o n a   L a b s   I n c .
2014-08-26 12:01:06.097 Corona Simulator[329:507]     Version: 3.0.0
2014-08-26 12:01:06.097 Corona Simulator[329:507]     Build: 2014.2393
2014-08-26 12:01:06.160 Corona Simulator[329:507] Platform: iPhone / x86_64 / 10.9 / NVIDIA GeForce 320M OpenGL Engine / 2.1 NVIDIA-8.24.15 310.90.9.05f01 / 2014.2393
2014-08-26 12:01:06.251 Corona Simulator[329:507] The file sandbox for this project is located at the following folder:
    (/Users/XXXXX/Library/Application Support/Corona Simulator/PhoneCallTest-1F7D702B2B7F0D5D0455BEE6AF59FE8D)
2014-08-26 12:01:06.316 Corona Simulator[329:507] WARNING: url( tel:1234567890 ) is not supported by the simulator
Warning: /Users/XXXXX/Documents/XXXXX/XXX/PhoneCallTest/main.lua:1: system.openURL() failed to open URL: tel:1234567890

I’ve tried it in the Xcode sim too but get the same response, anybody got any ideas? Am I missing a library?

EDIT: I’ve also tried this on an Android phone (MotoG) and it failed to do anything…

Hi @MatthewCharlesHarrop,

What happens when you try it on an actual iOS device?

Brent

You need to include an extra permission (iirc) for android.

The android developer site lists all these permissions, i would imagine the system.openURL doc page lists them too?

Calls doesn’t work in Simulator… I solved my problem including this in build.settings:

[lua]

android =

{

        usesPermissions =

        {

                “android.permission.CALL_PHONE”,

        },

}

[/lua]

And testing directly on device.

Ok, so it works on Android now :smiley:

I’ve just got to try it on iOS, but I am sure it’ll work. Thanks very much for your help!

Hi,

I’m sorry to resurrect an old topic but I too am struggling with making a phone call.

I use system.openURL(“tel:1234567890”) but the only response I get is:

2014-08-26 12:01:06.096 Corona Simulator[329:507]
Copyright © 2009-2014  C o r o n a   L a b s   I n c .
2014-08-26 12:01:06.097 Corona Simulator[329:507]     Version: 3.0.0
2014-08-26 12:01:06.097 Corona Simulator[329:507]     Build: 2014.2393
2014-08-26 12:01:06.160 Corona Simulator[329:507] Platform: iPhone / x86_64 / 10.9 / NVIDIA GeForce 320M OpenGL Engine / 2.1 NVIDIA-8.24.15 310.90.9.05f01 / 2014.2393
2014-08-26 12:01:06.251 Corona Simulator[329:507] The file sandbox for this project is located at the following folder:
    (/Users/XXXXX/Library/Application Support/Corona Simulator/PhoneCallTest-1F7D702B2B7F0D5D0455BEE6AF59FE8D)
2014-08-26 12:01:06.316 Corona Simulator[329:507] WARNING: url( tel:1234567890 ) is not supported by the simulator
Warning: /Users/XXXXX/Documents/XXXXX/XXX/PhoneCallTest/main.lua:1: system.openURL() failed to open URL: tel:1234567890

I’ve tried it in the Xcode sim too but get the same response, anybody got any ideas? Am I missing a library?

EDIT: I’ve also tried this on an Android phone (MotoG) and it failed to do anything…

Hi @MatthewCharlesHarrop,

What happens when you try it on an actual iOS device?

Brent

You need to include an extra permission (iirc) for android.

The android developer site lists all these permissions, i would imagine the system.openURL doc page lists them too?

Calls doesn’t work in Simulator… I solved my problem including this in build.settings:

[lua]

android =

{

        usesPermissions =

        {

                “android.permission.CALL_PHONE”,

        },

}

[/lua]

And testing directly on device.