How do I differentiate from which store app is ins

2019-03-05 10:51发布

My app. is deployed in Play Store as well as Baidu Store. For notificatiions, need to differentiate from where app. is installed.

When I used getInstallerPackageName() method, Redmi Note 3 returns correct value but HTC returns null.

Why is this difference observed ?

Is there any other better way ?

1条回答
smile是对你的礼貌
2楼-- · 2019-03-05 11:13

Regarding this answer: https://stackoverflow.com/a/13293534/2724879 i suggest that when its null then its from Baidu and when its com.android.vending then its from google xD

查看更多
登录 后发表回答