Safe to run
Search
⌃K

Install origin check

The purpose of this function is to ensure that packages are not installed from anywhere other than the configured appstores.
// With amazon and google play store configured
safeToRun({installOriginCheckWithDefaultsCheck("com.example.installer")})
​
// Without amazon and google play store configured by default
safeToRun({installOriginCheckWithoutDefaultsCheck("com.example.installer")})
When installing from android studio or adb, this check will naturally fail - you might want to wrap it for debug builds to let you develop; e.g with if (!BuildConfig.DEBUG)