queryIntentActivitiesCompat

@RequiresPermission(value = "android.permission.QUERY_ALL_PACKAGES")
fun PackageManager.queryIntentActivitiesCompat(intent: Intent, flags: Int = 0): List<ResolveInfo>

This function will query the resolvable (exported) activities of the target intent using this PackageManager. This is useful when you want to start another app.

Will work only if Manifest.permission.QUERY_ALL_PACKAGES permission is present.

Return

the List of ResolveInfos for launchable activities.

Parameters

flags

are PackageManager.ResolveInfoFlags and are listed as members of the PackageManager class.