0

i created a html5 game in construct2 and compiled it using phonegap build. compiled apk works fine in android mobile phones. but when i installed it on tablets and bluestack, its not opening. i get a black screen for half second and the app exists. I am using crosswalk webview plugin.

How to make it work in tablets.

this is my 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="check.centum" version="1.0">

 <name>Centum</name>
 <description>you can alse get centum</description>
 <author></author>

 <preference name='phonegap-version' value='cli-5.2.0' />
 <preference name="permissions" value="none"/>
 <preference name="android-build-tool" value="gradle" />

 <feature name="http://api.phonegap.com/1.0/network"/>
 <plugin name="cordova-plugin-media" source="npm" />

 <preference name="orientation" value="landscape" />
 <preference name="fullscreen" value="true" />
 

 <plugin name="cordova-plugin-admobpro" spec="2.8.0" source="npm"/>
 <plugin name="cordova-plugin-crosswalk-webview-pgb-adapt" source="npm" spec="1.4.0-dev-5" />

 <plugin name="cordova-plugin-whitelist" source="npm" />
 <access origin="*" />



</widget>
john livingston
  • 115
  • 1
  • 3
  • 16

1 Answers1

0

I see a lot of elements are missing in your config.xml.

When you create an android project with phonegap, there's going to be a default config.xml file. Within that file, add the plugins you might want to use, then try to build and run it.

If it doesn't work, try adding

xmlns:android="http://schemas.android.com/apk/res/android"

as your widget property.

Also, you might want to have at least a permission of Internet connectivity.

In android, it's called

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

because phonegap requires network connection to run it.

Hoon
  • 637
  • 5
  • 10