Programming Tips - Android: what installed my app?
Date: 2019apr26
OS: Android
Q. Android: what installed my app?
A. getPackageManager().getInstallerPackageName() returns the package name of the installer. For Google Play this is com.android.vending
Source
https://www.reddit.com/r/androiddev/comments/bhn4o4/checking_if_app_is_from_play_store_or_installed/