The only solution (not quite acceptable) I have found is to ask the user to reinstall my application to be able to grant the permission to the other app.
You can include a <permission>
element for the same permission from the third-party app in yours (e.g., perm.Y
or perm.Z
). Then, you will get the permission at install time, and it will work once the third-party app is installed. The fact that this is possible is bad, and the third-party app may take steps as a result. Hence, in the long term, you may need to negotiate with the third party to make sure that you are doing this in a way that the third party will find acceptable.