How can I generate multiple android targets (tv, phone, tablet, auto, etc) ?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By m.conrad

After adding the android template to a project, what needs to be done to be able to have multiple apk/aar outputs with different manifests and “features” tags via export presets?

:bust_in_silhouette: Reply From: Calinou

Godot’s export system isn’t designed for multiple APK outputs other than splitting by architecture. You could work this around by creating multiple export presets (each with their own custom feature tag), but this will require you to export presets one by one.

Instead, I recommend doing this the following:

  • Use Godot’s multiple resolutions support to adapt the interface to the screen resolution. This will usually result in good enough support for tablets, but if you want a dual-column interface, you can enable it dynamically in a script depending on the screen’s narrowest dimension size. For TVs, you can force a custom content scale using SceneTree’s set_screen_stretch() method at run-time.
  • If resolution or DPI-based screen detection is not possible, use run-time device type detection to adapt the game/app’s interface to the screen. This is not something provided by Godot out of the box, but it can be done by [creating an Android plugin](Creating Android plugins — Godot Engine (stable) documentation in English.