FAQ #22657, published on 2022-01-18
How to allow another application to be launched with ExeRun from an application on Android 11 ?

From Android 11 onwards (API Level 30), by default an application cannot launch another one. For example launching Gmail with ExeRun("com.google.android.gm") will fail with the response :

Launching the executable "com.google.android.gm" failed for the following reason:

The application <com.google.android.gm> does not exist or was not found.


There are two solutions to allow the launch:

  • Solution 1: Add the QUERY_ALL_PACKAGES permission in the application generation wizard:

    The limitation is removed, but publication in the Play Store will require additional justification to Google. Apps that don’t have a justifiable use case for the permission risk being removed from the Google Play Store. All developers who want to keep the permission in their apps need to complete a declaration form justifying their use of it. 

    This solution is therefore generally only chosen for deployment via a Private Store (MDM/WDBaaS).

  • Solution 2 : The app that starts a service of another app must include the next declaration in manifest: 

        <package android:name="com.example.anotherapp" />

See also : Android, ExeRun