Supporting Amazon and Android market (Google Play) links inside application

后端 未结 7 1397
感动是毒
感动是毒 2020-12-01 03:40

So one of my applications was rejected from the Amazon app store today. The reason was because inside my app, I linked to the paid version of the app on the Android market.

7条回答
  •  生来不讨喜
    2020-12-01 04:15

    As you said, you could use a boolean and then be forced to build your apps twice, so I bevelive it's not the best way.

    The best way is to check if android market is installed and act accordingly: here.

    Another even more complex way is to query the name of the installer of your app, using PackageManager.getInstallerPackageName. This needs extra work since the app can be installed by parallel markets even if you are on android device with android market installed, and also you must check if it's installed as debug/development (installer package name is null in this case).

提交回复
热议问题