Skip to content

Commit

Permalink
Require camera permission
Browse files Browse the repository at this point in the history
Camera permission required when targetSdkVersion is >= 28
  • Loading branch information
metuuu committed Dec 11, 2020
1 parent fcc470d commit 9d4ff1d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<uses-permission android:name="android.permission.CAMERA" /> <!-- Camera permission required when targetSdkVersion is >= 28 -->
<uses-feature android:name="android.hardware.camera" />

<uses-feature android:name="android.hardware.usb.host"/>

<application
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class SplashActivity extends AppCompatActivity {
private static final String[] REQUIRED_PERMISSION_LIST = new String[]{
Manifest.permission.WRITE_EXTERNAL_STORAGE,
Manifest.permission.RECORD_AUDIO,
Manifest.permission.CAMERA, // only required when targetSdkVersion >= 28
};
private static final int REQUEST_CODE = 1;
private List<String> mMissPermissions = new ArrayList<>();
Expand Down

0 comments on commit 9d4ff1d

Please sign in to comment.