'Is using "android.permission.FLASHLIGHT" twice in the manifest page redundant?
I am new to XML and android app development in general. I cloned the code for an app from github, for learning purposes.
In the manifest page, this line is used twice <uses-permission android:name="android.permission.FLASHLIGHT" />
Should I remove it because it is redundant, or is it used twice specifically for some reason that I should be aware of?
Example:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myapp">
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-permission android:name="android.permission.INTERNET" />
Solution 1:[1]
It's redundant. You only need to request a permission once, requesting it a second time does nothing.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Gabe Sechan |
