Just like BuildConfig.FLAVOR and BuildConfig.DEBUG is there a build flag to check at runtime for the APK version or the Instant App version of an Android application ?
Or is there another way to get the information ?
Just like BuildConfig.FLAVOR and BuildConfig.DEBUG is there a build flag to check at runtime for the APK version or the Instant App version of an Android application ?
Or is there another way to get the information ?
Easiest way is to use PackageManager.isInstantApp() :
Or, a regular (non-appcompat version) https://developer.android.com/reference/android/content/pm/PackageManager#isInstantApp()
Also has an override which accepts package name as a string, which allows to check other apps, if permissions allow.