1. Create Android Application Project
2. In MainActivity.java, add the below:
package com.example.testandroid1;
import android.app.Activity;
import android.content.Intent;
class MainActivity extends Activity {
.....
public void onButtonClick(View v)
{
Intent intent =new Intent(Intent.ACTION_CALL,Uri.parse("tel:110"));
MainActivity.this.startActivity(intent);
}
}
3. In AndroidManifest.xml, add the below. Its level is same as <uses-sdk>
<uses-permission android:name="android.permission.CALL_PHONE" />
4. Right click the project and choose Run as -> Android Device Chooser ->Choose device