Monday, 12 December 2016


Android gives Built-in applications to telephone calls, in a few events we may need to make a telephone call through our application. This should effectively be possible by utilizing verifiable Intent with fitting activities. Likewise, we can utilize PhoneStateListener and Telephony Manager classes, keeping in mind the end goal to screen the adjustments in some communication states on the gadget.

In AndroidMainfest.XML, we should add uses-permission  for Phone Call State as shown below,

<uses-permission android:name="android.permission.CALL_PHONE" />

Activity_main.xml :-

<?xml version="1.0" encoding="utf-8"?>
 android:text="Android PHONE Call " 
 android:layout_gravity="center_horizontal" />

 android:layout_gravity="center_horizontal" />

 android:layout_gravity="center_horizontal" />
</LinearLayout> :-

package com.kiranapp;

import android.Manifest;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class MainActivity extends AppCompatActivity {
    Button callbtn;
    EditText ebtn;

 protected void onCreate(Bundle savedInstanceState) {
 callbtn = (Button) findViewById(;
 ebtn = (EditText) findViewById(;
 callbtn.setOnClickListener(new View.OnClickListener() {
 public void onClick(View v) {
 String s1 = ebtn.getText().toString();
 Intent callIntent = new Intent(Intent.ACTION_CALL);
 callIntent.setData(Uri.parse("tel:" + s1));
 if (ActivityCompat.checkSelfPermission(MainActivity.this,
         Manifest.permission.CALL_PHONE) != PackageManager.PERMISSION_GRANTED) {
                    // TODO: Consider calling  // 
 // here to request the missing permissions, and then overriding // 
 public void onRequestPermissionsResult(int requestCode, String[] permissions,
 // int[] grantResults) 
 // to handle the case where the user grants the permission. See the documentation 
 // for ActivityCompat#requestPermissions for more details. //




Output :-

Android phone call
Android PhoneCall figure


  1. Congratulations guys, quality information you have given!!!..Its really useful blog. Thanks for sharing this useful information
    Android Training institute in chennai with placement | Android Training in chennai

  2. This information is impressive; I am inspired with your post writing style & how continuously you describe this topic. After reading your post, thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic.Android Training institute in chennai with placement | Best Android Training in velachery

  3. I am really happy with your blog because your article is very unique and powerful for new reader.
    selenium training in chennai
    selenium training in bangalore