Join now - be part of our community!

Call somone in android code

Arda123456
Visitor

Call somone in android code

I have a code that calls a phonenumber. It works all of my devices samsung htc and some others. However It does not work on my tablet sonny xperia Z. It shows me a box that wants to add the contact to the contact list, which already exists.

Bundle extras = getIntent().getExtras();
if (extras == null) {
return;
}

String phoneNumber = extras.getString("phoneNumber");

Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse("tel:" + phoneNumber ));
startActivityForResult(callIntent, PICK_CONTACT_REQUEST);

Tags (3)
1 REPLY 1
Rickard
Master

Hi and welcome to the community! Since you're new please be sure that you have checked out our Discussion guidelines.

Tablet Z does not support voice calls so i suspect this is the reason that your code does not work. To place calls you need to use for example Skype, Tango or a SIP-client.