Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 3118703

Browse files
Android - Unnecessary permissions added to AndroidManifest.xml #740
1 parent e078fe6 commit 3118703

4 files changed

Lines changed: 14 additions & 5 deletions

File tree

demo-ng/app/App_Resources/Android/AndroidManifest.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
1919
<uses-permission android:name="android.permission.INTERNET"/>
2020

21+
<!-- for ML Kit -->
22+
<uses-permission android:name="android.permission.CAMERA"/>
23+
<uses-feature android:name="android.hardware.camera" android:required="false" />
24+
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
25+
2126
<application
2227
android:name="com.tns.NativeScriptApplication"
2328
android:allowBackup="true"

docs/ML_KIT.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ During plugin installation you'll be asked whether or not you want to use ML Kit
1515
In case you're upgrading and you have the `firebase.nativescript.json` file in your project root, it's safest to rename it (so you can see what your old configuration was),
1616
then clean your platforms folder (`rm -rf platforms`) and build your app again. You will be prompted which Firebase features you'll want to use.
1717
18+
## Required Android permissions
19+
In case you want to detect images from the camera, add these to your app resources `AndroidManifest.xml`:
20+
21+
```xml
22+
<uses-permission android:name="android.permission.CAMERA"/>
23+
<uses-feature android:name="android.hardware.camera" android:required="false" />
24+
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
25+
```
26+
1827
## ML Kit Features
1928
There are two ways of using ML Kit:
2029
-162 Bytes
Binary file not shown.

src/platforms/android/libraryproject/firebase/src/main/AndroidManifest.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
<manifest package="org.nativescript.plugins.firebase"
22
xmlns:android="http://schemas.android.com/apk/res/android">
33

4-
<!-- for ML Kit -->
5-
<uses-permission android:name="android.permission.CAMERA"/>
6-
<uses-permission android:name="android.permission.FLASHLIGHT"/>
7-
<uses-feature android:name="android.hardware.camera" android:required="false" />
8-
94
<!-- for Messaging -->
105
<application>
116
<service android:name=".MyFirebaseMessagingService">

0 commit comments

Comments
 (0)