SERVICE_MISSING/SERVICE_DISABLED Error - react-native-youtube - android

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:
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"
}

Related

device compatible(tablet) but cannot install the app on google play internal testing works fine on phone

i am developing a react native app for tablets,
i managed to upload a realease for internal testings, however the app only works on phone but not talblets, the tablet is available on the compatible devices's list, can any one help ? here is my AndroidManifest
package="com.pyProj">
<uses-permission android:name="android.permission.INTERNET" />
<supports-screens android:resizeable="true"
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true"/>
<application
android:name=".MainApplication"
android:label="#string/app_name"
android:icon="#mipmap/ic_launcher"
android:roundIcon="#mipmap/ic_launcher_round"
android:allowBackup="false"
android:usesCleartextTraffic="true"
android:theme="#style/AppTheme">
<activity
android:exported="true"
android:name=".MainActivity"
android:label="#string/app_name"
android:screenOrientation="landscape"
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 Build.gradle
ext {
buildToolsVersion = "30.0.2"
minSdkVersion = 21
compileSdkVersion = 31
targetSdkVersion = 31
ndkVersion = "21.4.7075529"
androidXCore = "1.7.0"
}
my tablet is a Lenovo TB-X306F
on google play store console i have this in internal testings
AppName
Accessible to internal testers
brightness_1
1 release code
Release date: June 6 15:16
Not examined
Version codes
16
Countries/Regions
176
Supported Android devices
17,793
the tablet is compatible i can see so i don't really understand why when i share the internal testings link i have this message:
This item isn't available
CLOSED This problem was because of country or regional restrictions. account on Tablet is created from another country, i tried changing the email adresse of google play store on the tablet and it worked

Camera2 API compatibility issues with google play store

I have developed an android app that uses the camera2 API. I am able to run this app on my own physical device when I'm debugging, but when I try to publish the app to the google play store, it says that my device isn't compatible - in fact, no devices are compatible with my app.
I have been in contact with google support, and they said that "your app is not compatible with most devices due to a conflict in your app’s manifest because of the following missing device feature: android.hardware.camera2. "
I have noticed that the min-sdk version in my gradle file was set to 15.
So my question is: Will my app become compatible with my devices if I change the min-sdk version to 21, or do I need to rewrite my entire code to use the deprecated camera API instead?
Thanks in advance.
*Edit:
This is my android manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="...">
<uses-feature
android:name="android.hardware.camera2"
android:required="true"/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:name=".app.AppController"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<meta-data
android:name="com.google.android.gms.vision.DEPENDENCIES"
android:value="barcode"/>
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:theme="#style/AppTheme.NoActionBar"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".ResultsActivity"
android:label="#string/app_name"
android:theme="#style/AppTheme.NoActionBar"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".QRScanner"
android:label="#string/app_name"
android:theme="#style/AppTheme.NoActionBar"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
There is no such feature as "android.hardware.camera2", so if you require it for your app to be installable on a device, you won't be installable anywhere, since no device anywhere reports that feature.
The camera2 API exists on all devices running Android 5.0 or later, it doesn't have a feature. Remove the feature line, and use the min-sdk line if you don't want to deal with devices too old to support camera2.

App working on API 25 to 21 but not under API 19

I've coded a app where Java call C++ code after a press on button.
App work as expected on API 25 to 21 but not under 19, trouble seems to be on C++ code.
jclass cls = env->FindClass("<PATH_TO_CLASS_");
assert(cls != NULL);
jfieldID info5_ID = env->GetFieldID(cls, "info5", "java/lang/String");
assert(info5_ID != NULL);
On android API 25 to 21 :
info5_ID is different from NULL and app go on
On android API 19 and under :
info5_ID is NULL so assert doest it job...
Is there a workaround or something like that? I've made my some research nothing found except this thread Android App crashes on API level 19 but works fine on API above 19
But I a not sure if this should be use for my app.
Here is my manisfest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="cpi.testjniapi19">
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE"/>
<application
android:name=".Adi"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme"
android:vmSafeMode="true">
<activity
android:name=".MainActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
Thanks in advance,
Clmnt
As Richard Critten was pointing, changing "java/lang/String" to "Ljava/lang/String;"has resolved the problem.
_/!\_Don't forget the ";"_/!\_
Kudos Richard.

Compatible Android versions receiving incompatibility message on Google Play

I've researched this pretty thoroughly and so far as I can tell, all that you should have to do is use portions of the Android API the devices you're supporting will recognize, and to specify a version range in your Manifest file. I've done both of these things. (See below these paragraphs for the full Manifest file contents.)
My client has Android version 4.0.4, which should be compatible, but when she tries to download the beta via Google Play, the link says that her device (a Samsung of some sort) is incompatible.
I'm not sure what else I need to do at this point, so any advice will be a huge help.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.osu.expandablelistviewtest1" >
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="18" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="Expandable List Test 1"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="Expandable List Test 1" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".activities.CoreConversationsActivity"
android:label="Book 2: Core Conversations (ver. 0.1)" >
</activity>
<activity
android:name=".activities.DrillsActivity"
android:label="Book 2: Drills (ver. 0.1)" >
</activity>
<activity
android:name=".activities.StreamAudioActivity"
android:label="Book 2: Streaming Audio (ver. 0.1)" >
</activity>
<activity
android:name=".activities.StreamVideoActivity"
android:label="Book 2: Streaming Video (ver. 0.1)" >
</activity>
</application>
</manifest>
As suggested in comments, the issue was with the build.gradle file. Improbably, Android Studio still doesn't update the following segment on the basis of the information in the Manifest file:
defaultConfig {
applicationId "edu.osu.expandablelistviewtest1"
minSdkVersion 14
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
In my case, minSdkVersion had been set to 16 rather than 14, leading to issues of compatibility

Google TV : Supported Android devices 0 devices

image link
this is my Google TV application manifest which i uploaded on google play end i get message "0 devices are suported" can someone tell my what i'm making wrong
(i want to target googleTV devices)
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="*******"
android:versionCode="12"
android:versionName="1.081" >
<uses-sdk
android:minSdkVersion="3"
android:targetSdkVersion="17"
android:maxSdkVersion="17"/>
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
<uses-feature android:name="com.google.android.tv" android:required="true"/>
<application
android:name=".App"
android:icon="#drawable/logo_min"
android:label="#string/app_name" >
<activity
android:name=".WelcomeActivity"
android:label="#string/title_activity_main" >
<!-- android:screenOrientation="landscape" -->
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
You might wish to use "aapt dump badging " to see, but it looks like something in your APK is requesting native tools (Native Platforms in your chart) - perhaps a library you included?
For sure using anything native will keep you from being seen on a Google TV currently.
I'm also a bit concerned about the uppercase TV in Features.
I think your minSdkVersion needs to be 11.
Reference:
https://developers.google.com/tv/android/docs/gtv_market_publishing_checklist

Categories

Resources