I am trying to make call from my app. But every time it get crashed with no error shown on logcat. I took permission in manifest also check it at runtime.
public void call(String number){
Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse("tel:"+number));
callIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(callIntent);
}
Don't forget to add the relevant permission to your manifest:
An intent by itself is simply an object that describes something. It doesn't do anything.
And How to make call in Android 6.0 and Above