Using mock location provider in production
Using mock location provider in production
Using a mock location provider (by requiring the permission android.permission.ACCESS_MOCK_LOCATION
) should only be done in debug builds (or from tests). In Gradle projects, that means you should only request this permission in a test or debug source set specific manifest file.
To fix this, create a new manifest file in the debug folder and move the <uses-permission>
element there. A typical path to a debug manifest override file in a Gradle project is src/debug/AndroidManifest.xml.
Issue id: MockLocation
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for Android 2023.3, Qodana for JVM 2023.3 |
Plugin: | Android, 2022.3.1 Beta 2 |
Last modified: 13 July 2023