I am trying to play a YouTube video inside a dialog box. However, I suspect the video isn't playing due to dialogs not having a distinct lifecycle. While the YouTube video loads, it shows "this video is unavailable," even though the same video works in an activity within the same app.
I followed the method of rendering the activity as a dialog, as outlined here: https://developer.android.com/develop/ui/views/components/dialogs#ActivityAsDialog. However, this approach requires extending Activity instead of AppCompatActivity. Activity Class does not have a getLifeCycle().addObserver() method.
any help would be appreciated
I am trying to play a YouTube video inside a dialog box. However, I suspect the video isn't playing due to dialogs not having a distinct lifecycle. While the YouTube video loads, it shows "this video is unavailable," even though the same video works in an activity within the same app.
I followed the method of rendering the activity as a dialog, as outlined here: https://developer.android.com/develop/ui/views/components/dialogs#ActivityAsDialog. However, this approach requires extending Activity instead of AppCompatActivity. Activity Class does not have a getLifeCycle().addObserver() method. any help would be appreciated