Mobile/Android

[Android]안드로이드 전화 사용 Intent

out of coding 2015. 9. 8. 09:12

안드로이드 전화 사용하는 방법


1. 다이얼 노출하는 방식

Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:010-1111-2222"));

startActivity(intent);

2. 전화를 바로 거는 방식

Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:010-1111-2222"));

startActivity(intent);


AndroidManifest.xml 파일에 다음을 추가합니다.

<uses-permission android:name="android.permission.CALL_PHONE" />