Android Custom Permission Fails Based on App Install Order

前端 未结 2 1340
旧时难觅i
旧时难觅i 2020-12-30 06:01

Having issues with my apps on Google Play. I have a free app which utilizes a custom permission. This permission allows access to paid apps. These paid apps act as \"keys\"

2条回答
  •  有刺的猬
    2020-12-30 06:30

    Put the same element in both apps. Also, since this is specific to your two apps, I would use android:protectionLevel="signature" instead of normal -- this means the user will never need to approve the permission and nobody else will be able to request the permission. And, this recipe will allow installation in either order.

    UPDATE: Note, however, that the use of custom permissions opens up potential vulnerabilities, due to Android's "first one in wins" approach.

    UPDATE #2: And this is now no longer supported as of Android 5.0, as two apps cannot both have the same element unless they are signed by the same signing key.

提交回复
热议问题