Search code examples
androidcordovaionic-frameworkandroid-permissionscapacitor

Violation Request Install Packages Permission: Permission use is not directly related to your app's core purpose


Violation Request Install Packages Permission: Permission use is not directly related to your app's core purpose.

We found that your app is not compliant with how REQUEST_INSTALL_PACKAGES permission is allowed to be used. Specifically, the use of the permission is not directly related to the core purpose of the app.

Previous answers recommended in

Ionic capacitor remove REQUEST_INSTALL_PACKAGES permission for android build

<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" tools:node="remove"/>

In the AndroidManifest.xml

Or removing from Android Manifest.xml Merged Manifest Tab, which has no reference to

android.permission.REQUEST_INSTALL_PACKAGES.

The only Cordova plugin I use is localforage-cordovasqlitedriver

list of capacitor plugins,

enter image description here

How do I effectively search through the plugins and project to find which one is adding android.permission.REQUEST_INSTALL_PACKAGES.

I also found

public static final String REQUEST_INSTALL_PACKAGES = "android.permission.REQUEST_INSTALL_PACKAGES";

in ~/Library/Android/sdk/platforms/android-32/android.jar!/android/Manifest.class


Solution

  • Here is what I found,

    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" tools:node="remove"/>
    

    adds the permission into the manifest-merger-release-report.txt.

    Note this report will show any plugins that add the REQUEST_INSTALL_PACKAGE

    So yes it is removed from the App, but the report says the REQUEST_INSTALL_PACKAGES permission is in the App and that is enough to get rejected by Google Play store. Also any previous releases in

    Open testing,

    Closed testing,

    Internal testing,

    Or Production

    That has REQUEST_INSTALL_PACKAGE will cause the App to be rejected even though the Request Install Package is not present in your new release

    see

    https://github.com/Baseflow/flutter-permission-handler/issues/869