PhoneGAP Build APK is not compatible with many devices on Google Play (e.g. Nexus 7)

  • 1
  • Problem
  • Updated 7 years ago
  • Solved
Hey,

When publishing the APK generated by PGB - Google Play says the App is "not supported" by 267 devices, including Google Nexus 7.

Any idea how can that be solved?
Photo of Oren Agiv

Oren Agiv

  • 84 Posts
  • 3 Reply Likes

Posted 7 years ago

  • 1
Photo of Oren Agiv

Oren Agiv

  • 84 Posts
  • 3 Reply Likes
Forgot to include the config.xml:



<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"
id = "com.test"
version = "1.0.0">

<name>Test</name>

<description>Test</description>

<author href="http://www.test.com/" email="info@test.com">Test</author>

<preference name="phonegap-version" value="2.5.0" /> <!-- all: current version of PhoneGap -->
<preference name="orientation" value="default" /> <!-- all: default means both landscape and portrait are enabled -->
<preference name="target-device" value="universal" /> <!-- all: possible values handset, tablet, or universal -->
<preference name="fullscreen" value="true" /> <!-- all: hides the status bar at the top of the screen -->
<preference name="webviewbounce" value="false" /> <!-- ios: control whether the screen 'bounces' when scrolled beyond the top -->
<preference name="prerendered-icon" value="true" /> <!-- ios: if icon is prerendered, iOS will not apply it's gloss to the app's icon on the user's home screen -->
<preference name="stay-in-webview" value="false" /> <!-- ios: external links should open in the default browser, 'true' would use the webview the app lives in -->
<preference name="ios-statusbarstyle" value="black-opaque" /> <!-- ios: black-translucent will appear black because the PhoneGap webview doesn't go beneath the status bar -->
<preference name="detect-data-types" value="false" /> <!-- ios: controls whether data types (such as phone no. and dates) are automatically turned into links by the system -->
<preference name="exit-on-suspend" value="false" /> <!-- ios: if set to true, app will terminate when home button is pressed -->
<preference name="show-splash-screen-spinner" value="false" /> <!-- ios: if set to false, the spinner won't appear on the splash screen during app loading -->
<preference name="auto-hide-splash-screen" value="false" /> <!-- ios: if set to false, the splash screen must be hidden using a JavaScript API -->
<preference name="disable-cursor" value="false" /> <!-- blackberry: prevents a mouse-icon/cursor from being displayed on the app -->
<preference name="android-minSdkVersion" value="7" /> <!-- android: MIN SDK version supported on the target device. MAX version is blank by default. -->
<preference name="android-installLocation" value="auto" /> <!-- android: app install location. 'auto' will choose. 'internalOnly' is device memory. 'preferExternal' is SDCard. -->

<gap:plugin name="BarcodeScanner" />
<gap:plugin name="GenericPush" />
<gap:plugin name="GAPlugin" />

<access origin="*" />

<icon src="icon.png" />
<gap:splash src="splash.png" />

</widget>
Photo of John Saya

John Saya

  • 68 Posts
  • 7 Reply Likes
Hi Oren,

The only way, at the moment, to get devices like Nexus 7 to be compatible is to compile locally. This is mostly in part because the Nexus 7 only has a front facing camera and Google Play flags your app as incompatible because of several contributing factors.

First, your manifest should include:


<uses-feature android:name="android.hardware.camera" android:required="false"/>
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>


The android:required="false" tells Google Play that the camera isn't required, even though your app might use it (again, mainly because it only has a front camera)

Second, since there are all sorts of screen variations out these days, you may have to set compatibility options:


<supports-screens
android:xlargeScreens="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:resizeable="true"
android:anyDensity="true"
/>

<compatible-screens>
<!-- hdpi and xhdpi normal creens -->
<screen android:screenSize="normal" android:screenDensity="mdpi" />
<screen android:screenSize="normal" android:screenDensity="hdpi" />
<screen android:screenSize="normal" android:screenDensity="xhdpi" />

<!-- Large screens -->
<screen android:screenSize="large" android:screenDensity="ldpi" />
<screen android:screenSize="large" android:screenDensity="mdpi" />
<screen android:screenSize="large" android:screenDensity="hdpi" />
<screen android:screenSize="large" android:screenDensity="xhdpi" />

<!-- X-large size screens -->
<screen android:screenSize="xlarge" android:screenDensity="ldpi" />
<screen android:screenSize="xlarge" android:screenDensity="mdpi" />
<screen android:screenSize="xlarge" android:screenDensity="hdpi" />
<screen android:screenSize="xlarge" android:screenDensity="xhdpi" />

<!-- Nexus 7 -->
<screen android:screenSize="large" android:screenDensity="213" />

</compatible-screens>



Hope that helps,

John
Photo of Oren Agiv

Oren Agiv

  • 84 Posts
  • 3 Reply Likes
Thanks!

I also found another solution - that is also relevant for users using PGB:
I simply generate 2 APKs using PGB:
One with the Camera permissions, and the other without.
When publishing in Google Play - it is possible to deploy 2 APKs, and Google Play knows to perform the "merge" in order to allow maximum supported devices.

Hope this also helps someone :)
Photo of Zahir

Zahir

  • 3500 Posts
  • 40 Reply Likes
Assuming the problem is resolved, this issue is now closed.
Create a new issue if you have any other problem with PhoneGap Build.
Thanks

This conversation is no longer open for comments or replies.