Basic Phone Application

ItWorks

Member
Licensed User
Longtime User
Hi Guys/Gals, need a bit of help please.
Writing a new phone app for an Industrial 7 inch tablet, has a GSM/GPRS Data module but no installed voice phone app, works on all http and ftp data functions, but I cannot get it to make a voice call, must be missing something in the manifest.
My early application skeleton is atatched if anyone can help.
Thanks !
 

Attachments

  • BasicPhone.zip
    52.9 KB · Views: 286

ItWorks

Member
Licensed User
Longtime User
Phone Call Error

Hi Erel,
I am using the Phone library version 2 and using
Dim myPhone As Phone
Dim myPhoneCalls As PhoneCalls
in the global declarations and then
StartActivity(myPhoneCalls.Call(txtPhoneNumber.Text)) to initiate the call
and this is where it is going wrong, all it does is call the contact manager and asks if you want to add the number and a profile, if you cancel the choice it does not go on to make the call but just returns.
See my attachment for more details, very simple so it should make a call, I've added permissions (and telephony hardware use) to the manifest
AddPermission (
android.permission.INTERNET
android.permission.CALL_PHONE
android.permission.READ_PHONE_STATE
android.permission.SEND_SMS
android.permission.READ_SMS
android.permission.RECEIVE_SMS)

Any pointer you can give me would be appreciated.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Note that you do not need to manually add the permissions. In fact your manifest editor code is wrong as AddPermission expects a single permission.

PhoneCalls.Call creates an intent with the ACTION_CALL action. This action is supposed to open the default dialing application. It is possible that a different application on your phone has received this intent instead. You can try to dial the number directly. See this thread: http://www.b4x.com/forum/basic4andr...9947-automatic-telephone-call.html#post115189
 
Upvote 0

ItWorks

Member
Licensed User
Longtime User
Hello Erel,

Thanks for the feedback, I have corrected the permissions and read through the thread link you provided and added the code
Dim i As Intent
i.Initialize(i.ACTION_CALL, txtPhoneNumber.Text)
StartActivity(i)
to make the call directly, but it now reports an error saying
"No Activity found to handle Intent {act=android.intent.action.CALL....."
This looks to me like voice calls are not enabled (or allowed) in this Android OS build (ICS Version 4.0.3)

Unless you have anymore suggestions I will have to take this up with the manufacturers.

Thanks for your help.
 
Upvote 0

tchart

Well-Known Member
Licensed User
Longtime User
Just an FYI but are you sure the device is capable of doing voice calls?

The reason I ask is that even though it may have 3G it may not do voice calls.

Take for example I have a Galaxy Tab 8.9. It has 3G but does not support voice calls. There is no dialler but even when a dialler is introduced it still cannot make calls with the stock firmware.

I believe voice calls can be enabled using Cyanogenmod but that is only becuase additional libraries, drivers etc were introduced.

So I would suggest you make sure the device actually supports voice calls before you dedicate too much time to this.
 
Upvote 0

ItWorks

Member
Licensed User
Longtime User
Voice Phonecalls

Hi tchart, thanks for the info but I had already put this confirmation process in motion by firing off emails to the manufacturers (Mitac computers in Taiwan) about the build status of the Tablet I am using.

So just to close down this thread, the manufacturer has fianlly replied and confirmed to me that the 3G module they use does NOT make voice calls it can only be used for Data calls.

So if anyone else are having any problems in this area then confirm first the unit will actually make a voice call, I have another Industrial Tablet which is the rugged version of the Google Nexus 7 which has the same condition, Data enabled but Voice Not enabled.

Looks like the Data module they are all using is cheaper than a combined Voice & Data module.

So thank you all again for your help.
 
Upvote 0

giga

Well-Known Member
Licensed User
Longtime User
Hi tchart, thanks for the info but I had already put this confirmation process in motion by firing off emails to the manufacturers (Mitac computers in Taiwan) about the build status of the Tablet I am using.

So just to close down this thread, the manufacturer has fianlly replied and confirmed to me that the 3G module they use does NOT make voice calls it can only be used for Data calls.

So if anyone else are having any problems in this area then confirm first the unit will actually make a voice call, I have another Industrial Tablet which is the rugged version of the Google Nexus 7 which has the same condition, Data enabled but Voice Not enabled.

Looks like the Data module they are all using is cheaper than a combined Voice & Data module.

So thank you all again for your help.

I guess this is the same issue? :confused:

I have a Galaxy tab 2 . I can register with my PBX successfully,

When I make a call I get the recording for that extension from the PBX.

when I used txtPhoneNumber.Text like in your example it won't dial out.

B4X:
CurrentCall = Sip.MakeCall("sip:[email protected]", 30)

Does anyone have any suggestions THANKS..:)
 
Upvote 0
Top