How do I differentiate from which store app is installed from i.e Baidu Store / Google Play Store?

139 Views Asked by At

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

There are 1 best solutions below

4
On

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