Search code examples
google-playsamsung-galaxy

How to check if the app is downloaded from Google Play Store or Samsung Galaxy Store?


Currently I am uploading my app to Google Play Store. So I have linked some buttons to Google Play Store for more apps and rating. Now I am trying to upload the app to Galaxy Store. However, for them, Play Store links needs either to be removed from the app or update them with Galaxy Store links. I found a way to check if the app is downloaded from the Play Store using the link here. How to check if it is downloaded from Galaxy Store?

Thank you.


Solution

  • val pm = packageManager
    val installer = pm.getInstallerPackageName(packageName)
    

    The package name for the Samsung Galaxy Apps Store is com.sec.android.app.samsungapps.