Hi Guys!
Today i am going to share the code of Action dial in android.
Phone dialer is an activity available with Android operating system to call a number. In this article, we will create an application which invokes the dialer on a button click. Android system provides a standard action name called �ACTION_DIAL� to invoke the dialer. We will make use this action to invoke the the dialer from our application.
Cheers Guys!
Today i am going to share the code of Action dial in android.
Phone dialer is an activity available with Android operating system to call a number. In this article, we will create an application which invokes the dialer on a button click. Android system provides a standard action name called �ACTION_DIAL� to invoke the dialer. We will make use this action to invoke the the dialer from our application.
Main.xml
MainActivity.java
package com.sunil.dial;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
public class MainActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button btn = (Button) findViewById(R.id.btn);
OnClickListener listener = new OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent("android.intent.action.DIAL");
startActivity(intent);
}
};
btn.setOnClickListener(listener);
}
}
Cheers Guys!
Update Contact :
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email : Fajarudinsidik@gmail.com
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email: Fajarudinsidik@gmail.com
atau Kirimkan Private messanger melalui email dengan klik tombol order dibawah ini :