Documentation Index

Fetch the complete documentation index at: https://academy.insiderone.com/llms.txt

Use this file to discover all available pages before exploring further.

How can we remove the Location methods in our Android project?

Prev Next

To remove the Location methods in your Android project:

  1. Go to the project manifest file.
  2. Replace the following lines with the new lines.
StatusLines
Old

<uses-permission android:name="android:permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android:permission.ACCESS_BACKGROUND_LOCATION" />
<uses-permission android:name="android:permission.ACCESS_COARSE_LOCATION" />

New<uses-permission android:name="android:permission.ACCESS_FINE_LOCATION" tools:node="remove" />
<uses-permission android:name="android:permission.ACCESS_BACKGROUND_LOCATION" tools:node="remove" />
<uses-permission android:name="android:permission.ACCESS_COARSE_LOCATION" tools:node="remove" />

If needed, add xmlns:tools="http://schemas.android.com/tools to the top of the manifest tag.