How to make a call to a phone number in android?

In Android, we can call any phone number by using Intent.ACTION_CALL. To call a phone number we need to access uses permission.

Here is the code that shows you how to call a particular phone number

[sourcecode language="java"]

public class ExampleApp extends Activity {
public void onCreate(Bundle savedInstanceState) {
startActivity(new Intent(Intent.ACTION_CALL, Uri.parse("tel:8304600889" )));


Here the sample phone number is '8304600889'.

Android Edittext Inputtype

Edittext inputtype is used to set your input type for edittext.

Ex:- You can set your edittext inputtype as 'Phone'. So that user can able to type only numbers.

Syndicate content