Unable to set supported screen sizes when exporting to Android

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By lukas
:warning: Old Version Published before Godot 3 was released.

I am preparing my app for Google Play store. After uploading console with details about apk reports that only small, normal and xlarge screens are supported regardless what I check in android export options in Godot (even if I unchecked all the screen sizes). I also have the issue reported here - console says that 165 permissions will be requested.

Is that a problem? I want my app to support normal, large and xlarge screens. And I don’t need any permission from users. Now it seems to me that users with large screens will not be able to download it. And further will all these permission be requested from users?

The figure bellow shows output of the console (sorry for Czech language). Anybody who has already released a game in Play Store has the same output from console?

I use Godot 2.0.

Details from Google Play developers console

:bust_in_silhouette: Reply From: lukas

The solution is to compile Android export template by yourself.

Steps:

  1. download the source of Godot (same version as you are using do develop the game)
  2. edit platform/android/AndroidManifest.xml.template.
  3. to change supported screen sizes find the passage
    <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="false" android:xlargeScreens="true"/>
    and change boolean tags according to your preferences (in my case false, true, true, true)
  4. to remove unwanted permissions find the passage after $$ADD_PERMISSION_CHUNKS$$ and remove the permissions you don’t want (in my case I removed them all)
  5. compile Android export templates according to - Compiling for Android
  6. link the compiled templates (apk files) in Android export options in section Custom Package
  7. export to Android

If anyone interested I place android release template that does not support small screens and that does not request any permission to Github

I’ve just done this after finally getting my build environment right. I did it so I could include “large” screen size (not sure why this is off by default?). I have a couple of questions though:

  1. The resulting release apk is 22,854 KB. This is about the same size as the debug. This results in my app’s apk going from 7Mb to 22Mb. The APK name is java-release-unsigned.apk is this right? (There are 2 debug ones, java-debug.apk and java-debug-unaligned.apk). I notice the ones in the templates .tpz file are both 13MB.

  2. Wouldn’t we zip this up into a .tpz file and re-import the whole file? Or is the above method just an alternative.

thanks

duke_meister | 2016-06-01 00:20