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" />
CodePudding user response:
It's redundant. You only need to request a permission once, requesting it a second time does nothing.