Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 헬스 운동 세트 타이머
- 아두이노
- 쌍암공원 무지개
- 쌍암공원 버섯
- 광주여행
- 안드로이드
- 주정차시간알림
- 스토어
- 히라가나읽기연습
- 우분투 OTP 연동
- 우분투
- 몽돌해변
- 광주 쌍암공원
- myip
- 리눅스 명령어
- 팔영산자동차야영장
- 담양온천야외수영장
- 포켓몬
- 전남영광가마미해수욕장
- 옥션 이벤트
- 도심캠핑
- 모바일쿠폰관리
- 몽산포 자동차야영장
- 이벤트
- 히라가나연습
- 녹보수 꽃
- vgrant
- 몸매사진관리
- 내장야영장
- 오토캠핑
Archives
- Today
- Total
KimsFactory*
API 23+ 외부 스토리지 읽기/쓰기 권한 매니페스트 설정 본문
API 23+의 경우 이미 매니페스트에있는 경우에도 읽기 / 쓰기 권한을 요청해야합니다.
// Storage Permissions private static final int REQUEST_EXTERNAL_STORAGE = 1; private static String[] PERMISSIONS_STORAGE = { Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE }; /** * Checks if the app has permission to write to device storage * * If the app does not has permission then the user will be prompted to grant permissions * * @param activity */ public static void verifyStoragePermissions(Activity activity) { // Check if we have write permission int permission = ActivityCompat.checkSelfPermission(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE); if (permission != PackageManager.PERMISSION_GRANTED) { // We don't have permission so prompt the user ActivityCompat.requestPermissions( activity, PERMISSIONS_STORAGE, REQUEST_EXTERNAL_STORAGE ); } }
출처 : http://stackoverflow.com/questions/8854359/exception-open-failed-eacces-permission-denied-on-android
문서 : https://developer.android.com/training/permissions/requesting.html
'Android' 카테고리의 다른 글
차량운행로그 - 법인차량 운행일지, 업무용승용차 운행기록 (0) | 2017.09.13 |
---|---|
JLPT N5 단어로 히라가나 익히기 - 일본어 히라가나 읽기 연습 게임 (0) | 2017.09.11 |
안드로이드 등록된 알람 확인하기 (0) | 2017.04.05 |
이미지 저장후 갤러리에서 보이게 하기 (0) | 2017.01.24 |
안드로이드 USB 디버깅 켜기 (0) | 2017.01.24 |
Comments