728x90
Intent intent = new Intent(Intent.ACTION_CALL,Uri.parse("tel:"+ mData.mobile));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
위 코드는 기존에는 문제없이 잘 동작했었는데, 안드로이드 6.0 이상에서는 에러가 발생한다.
아래 코드로 아직 해결이 안된 상태다.
if (ActivityCompat.checkSelfPermission(getBaseContext(), Manifest.permission.CALL_PHONE) == PackageManager.PERMISSION_GRANTED) |
728x90
'안드로이드 > 버그탈출' 카테고리의 다른 글
Android Studio 액션바(상단바) 없애기 (0) | 2017.05.09 |
---|---|
Activity 화면 갱신처리 (1) | 2017.04.29 |
Android 패키지 파일을 분할하는 중에 문제가 발생하였습니다. (0) | 2017.04.07 |
showDialog(int) from the type Activity is deprecated (0) | 2017.04.05 |
setlatesteventinfo() is deprecated (0) | 2017.04.05 |