YouTube Api For Android Exception "service_missing"
I want to play you tube video in my android application I got exception while youtube initialization like 'service_missing'. I write following code, package com.example.youtubedemo
Solution 1:
The issue with Android 11 is the os is restricting access to other apps. https://developer.android.com/training/basics/intents/package-visibility
Add the following to manifest tag in AndroidManifest to fix YouTube issue:
<queries>
<intent>
<action android:name="com.google.android.youtube.api.service.START" />
</intent>
</queries>
Solution 2:
As the API documentation for the Youtube API states:
YouTubeInitializationResult.SERVICE_MISSING
The YouTube API service is missing on this device.
You'll need to install the Youtube app into the emulator to make it work.
Post a Comment for "YouTube Api For Android Exception "service_missing""