ACTION_VIEW + queryIntentActivities with YouTube url does not show youtube app
I try to query all apps that can handle a link like following: https://youtube.com/watch?v=... Here's my function: private fun findAppsToOpenLinks(context: Context, url: String): List<ResolveInfo> { val intent = Intent(Intent.ACTION_VIEW).apply { data = url.toUri() } val list = if (Build.VERSION.SDK_INT >= 33) { context.packageManager.queryIntentActivities( intent, PackageManager.ResolveInfoFlags.of(PackageManager.MATCH_ALL.toLong()) ) } else { context.packageManager.queryIntentActivities(intent, 0) } return list } In return, I get some apps and all browsers that can handle the link. But the Y
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.