1

I'm trying to use the react-native-youtube package to display a youtube video in my app. When I try to render the youtube video to the screen, I get the following popup:

enter image description here

The github README states this:

IMPORTANT! (Android Only): The Android implementation of this component needs to have the official YouTube app installed on the device. Otherwise the user will be prompted to install / activate the app, and an error event will be triggered with SERVICE_MISSING/SERVICE_DISABLED.

First, I am positive that the latest version of the YouTube app is installed on my emulator. Just to note, I tried this on a real Amazon Fire Stick and had the same problem. This link explains that Android 11 requires you to indicate in the AndroidManifest.xml which packages you intend to reference. I have tried all of the recommendations there but have had no success.

Here is my current AndroidManifest.xml:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.digitalsignageplayer">
  
  <uses-permission android:name="android.permission.INTERNET" />
  <uses-feature android:name="android.hardware.screen.portrait" android:required="false"/>
  <uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
    <application
      android:name=".MainApplication"
      android:label="@string/app_name"
      android:icon="@mipmap/ic_launcher"
      android:roundIcon="@mipmap/ic_launcher_round"
      android:allowBackup="false"
      android:theme="@style/AppTheme">
      <activity
        android:name=".MainActivity"
        android:label="@string/app_name"
        android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
        android:launchMode="singleTask"
        android:windowSoftInputMode="adjustResize">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
      </activity>
    </application>
</manifest>

My compiled and target SDK:

ext {
        buildToolsVersion = "29.0.3"
        minSdkVersion = 21
        compileSdkVersion = 29
        targetSdkVersion = 29
        ndkVersion = "20.1.5948944"
    }
Cannon Moyer
  • 3,014
  • 3
  • 31
  • 75
  • Did you find any solution? @cannon Moyer – R.singh Oct 28 '21 at 09:05
  • 1
    @R.singh I haven't attempted the last suggestion but this is from an issue I commented on in github: https://github.com/davidohayon669/react-native-youtube/issues/518 I would definitely be interested in hearing about your solution if you get this to work. – Cannon Moyer Nov 01 '21 at 03:48

0 Answers0