The best way to name or dial a cellphone quantity from your individual {custom} Android App? – Full Supply code

This video reveals the steps to design an Android Software which can be utilized to name or dial any quantity. This video takes CALL_PHONE permission from person by defining the respective permission within the Manifest file. Within the later a part of this video it reveals the distinction between ACTION_CALL and ACTION_DIAL intents and the respective operations it performs for these intents.

The entire supply code of this Software is on the market at:

We hope you want this video. For any question, strategies or appreciations we shall be glad to listen to from you at: [email protected] or go to us at:

package deal com.instance.mycallerapplication;


import android.Manifest;
import android.content material.Intent;
import android.content;
import android.web.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;

import static android.Manifest.permission.CALL_PHONE;

public class MainActivity extends AppCompatActivity {

personal EditText editText;

protected void onCreate(Bundle savedInstanceState) {

editText = findViewById(;
ActivityCompat.requestPermissions(this, new String[]{CALL_PHONE}, PackageManager.PERMISSION_GRANTED);

public void CallButton(View view) {
if (checkSelfPermission(Manifest.permission.CALL_PHONE) != PackageManager.PERMISSION_GRANTED) {
// TODO: Contemplate calling
// Exercise#requestPermissions
// right here to request the lacking permissions, after which overriding
// public void onRequestPermissionsResult(int requestCode, String[] permissions,
// int[] grantResults)
// to deal with the case the place the person grants the permission. See the documentation
// for Exercise#requestPermissions for extra particulars.
startActivity(new Intent(Intent.ACTION_CALL, Uri.fromParts(“tel”, editText.getText().toString(), null)));
// startActivity(new Intent(Intent.ACTION_DIAL, Uri.fromParts(“tel”, editText.getText().toString(), null)));


Leave a Reply

Your email address will not be published. Required fields are marked *