Start phone activity in android
<p>I am trying to open the dialer in android. My code looks as follows:</p>

<pre><code>Intent callIntent = new Intent(Intent.ACTION_DIAL);
callIntent.setData(Uri.parse("tel:0123456789"));
startActivity(callIntent); 
</code></pre>

<p>And in my androidManifest.xml file I have the permission</p>

<pre><code>&lt;uses-permission android:name="android.permission.CALL_PHONE" /&gt;
</code></pre>

<p>The app runs and when I click on the button to start the intent, the dialer opens but with no telephone number visible. I have used this code before and it worked but now no errors are thrown. The other issue I found is that this code didn't work in my previous app for api &lt; 23.</p>

<p>Here's my onclick method:</p>

<pre><code>@Override
public void onClick(View v) {
    switch (v.getId()) {
        case R.id.bMapCall:
            if (!telephone.isEmpty()) {
                if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.CALL_PHONE) == PackageManager.PERMISSION_GRANTED) {
                    Intent callIntent = new Intent(Intent.ACTION_DIAL);
                    Log.i(LOG_TAG, "Phone number: " + telephone);
                    intent.setData(Uri.parse("tel:1234567890"));
                    startActivity(callIntent);
                }

            }
            default:
                break;
    }
}
</code></pre>