Can't open youtube link from my android app using intent ACTION_VIEW

471 views Asked by At

I want to open youtube link in youtube app, when I click button in my app. Instead of this I have this error:

AD-PLUGIN-...Controller com.miui.msa.global E  Get miui intent sender : com.testyoutube.app

Youtube app doesn't open, and after button click and this error all other ui in my app just off. I mean buttons are not pressed, lists are not scrolled, but animations continue to work and data is updated. It’s like an invisible window has opened on top of my application, and now I can’t interact with UI

My code:

val intent = Intent(Intent.ACTION_VIEW)
            intent.data = Uri.parse("https://www.youtube.com/")
            startActivity(intent)

My MIUI version is 12.5.1

I tryed to accepted "Displaying popup windows while running in the background" permission on App detail settings like in answer from this question:

MIUI - Permission denied while trying to start ACTION_SEND / ACTION_VIEW intent

But still have this error

0

There are 0 answers