I know that accessing a list of ALL the installed applications is quite trivial
var packageManager = getPackageManager() var packageList