godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.04k stars 21.11k forks source link

AndroidManifest.xml can't change the default <activity> #78782

Closed Abab-bk closed 1 year ago

Abab-bk commented 1 year ago

Godot version

Godot4.0.2 Stable

System information

Windows11, Inter i3-8100, RX580 2048SP, GLES2.

Issue description

I want to start my own Activity before .GodotApp starts because the Chinese app market requires users to read and agree to the privacy policy before applying for permissions. When I checked "use_gradle_build" and modified the Activity corresponding to ".GodotApp" in android/build/AndroidManifest.xml, I removed the "intent-filter" from it and added it to my custom Activity. Then I built the app. When I installed the app, two game icons appeared on my phone. I know this is because there are two "intent-filter" tags.

Steps to reproduce

  1. Open android/build/AndroidManifest.xml.
  2. removed the "intent-filter".
  3. added it to custom Activity.
  4. built the app.
  5. You will find that the previously deleted intent-filter in AndroidManifest.xml still exists, and two intent-filter exist at this time.

Minimal reproduction project

I had one, but it was too big after packing.

Calinou commented 1 year ago
Abab-bk commented 1 year ago

I found a temporary solution: just set the AndroidManifest.xml automatically generated by release/debug to read-only.

Calinou commented 1 year ago

For reference, this is a duplicate of https://github.com/godotengine/godot/issues/76963.