How to verify your app is installed from Play Store

Android provides a way to determine whether our app is installed via playstore or by any other appliaction. It would be very handy in case if we need to perform any action only when its a valid play store build and to ignore when its a debug build or a direct apk install from any apk sharing applications

 Android's PackageManager class helps us to identify the application that installed our app. Lets see how its done.