public void makecall(View view){
try {
Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse("tel:NUMBER"));
startActivity(callIntent);
Toast.makeText(this, "TEST",Toast.LENGTH_LONG).show();
Runnable showDialogRun = new Runnable() {
public void run(){
Intent showDialogIntent = new Intent(this, DialogActivity.class);
startActivity(showDialogIntent);
}
};
Handler h = new Handler();
h.postDelayed(showDialogRun, 2000);
} catch (ActivityNotFoundException activityException) {
Throwable e = null;
Log.e("helloandroid dialing example", "Callfailed", e);
}
}