I have an android app, which allows to play youtube video. I am using the latest YouTube API (1.2.1). I try it on a several devices within android version 4.0.4, 4.3, 4.4.4 or 5.0 and it works perfect (on every device is YouTube app version 10.-. But on one device, where is android 4.0.4 and YouTube app version 4.4.11 it does not work and get an error "An error occurred while initializing YouTube player". In documentation is written, that the minimal required version of YouTube app is 4.2.16. So I don't know, where is the problem.
Does somebody have an idea, what is wrong or how can I fix it?
Thanks a lot...
Update your Android youtube app to the latest version and it will work for Sure!!
Restart the YouTube app. Restart your device: Do a hard restart by disconnecting the power and then reconnecting. For game consoles: Uninstall and reinstall the YouTube app. Update your device's firmware/system software.
This issues coming in Android 11 and above version, due to Package visibility filtering
The limited app visibility affects the return results of methods that give information about other apps, such as queryIntentActivities(), getPackageInfo(), and getInstalledApplications(). The limited visibility also affects explicit interactions with other apps, such as starting another app's service.
For more info : https://developer.android.com/training/package-visibility
Add the below lines of code into your AndroidManifest.xml file
<queries>
<intent>
<action android:name="com.google.android.youtube.api.service.START" />
</intent>
</queries>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With