Skip to content

Commit

Permalink
fix(android): don't require camera permission in single app mode (#1990)
Browse files Browse the repository at this point in the history
  • Loading branch information
tido64 committed Apr 25, 2024
1 parent b775f79 commit 669205a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions android/app/build.gradle
Expand Up @@ -117,6 +117,10 @@ android {
buildConfigField "boolean", "ReactTestApp_useFabric", enableNewArchitecture.toString()
buildConfigField "boolean", "ReactTestApp_useBridgeless", enableBridgeless.toString()

manifestPlaceholders = [
rntaEnableCamera: project.ext.react.enableCamera ? "1000000" : "1"
]

resValue "string", "app_name", project.ext.react.appName

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
4 changes: 2 additions & 2 deletions android/app/src/main/AndroidManifest.xml
Expand Up @@ -4,10 +4,10 @@
xmlns:tools="http://schemas.android.com/tools"
package="com.microsoft.reacttestapp"
>
<uses-feature android:name="android.hardware.camera.any" />
<uses-feature android:name="android.hardware.camera.any" android:required="false" />

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.CAMERA" android:maxSdkVersion="${rntaEnableCamera}" />
<uses-permission android:name="android.permission.INTERNET" />

<application
Expand Down

0 comments on commit 669205a

Please sign in to comment.