How can I influence the future Android Manifest before the built-in APK export?

Not favoritedFavorited Favorited 0 favourites
  • 6 posts
From the Asset Store
Easily generate many levels from a set of pre-built scenes (Construct 3 template)
  • Hello! Is there a way to influence the future android manifest in construct itself, adding additional activities there? I know about cordova and android studio export, I'm interested in the built-in apk export. I tried to create my own plugin in which I refer to github where I wrote the code for adding additional activities to the manifest, but it didn't help, as if it was ignored. I tried to create config.xml in the project, it didn't help either.

    As far as I know, other engines have ways to edit the manifest, it would be strange if our engine didn't have any way :(

    I'm also interested in, for example, if you make an Android Studio export and write changes there, is it possible to somehow pack the project back and continue working in Construct?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • There are lots of things that influence the content of the Android manifest, but they are all either built-in or handled by plugins. What is it that you want to change that is not covered?

    Construct's build service doesn't give you an opportunity to edit the Android manifest as it just directly uploads your project and builds it for you. Part of the reason we have the Android Studio export option is to provide an alternative where you can do things like make more advanced customizations if you need to.

  • Thanks for the answer. If all activities can be added or edited using standard methods or plugins, I will be glad to receive your help. For example, from the latest tests I am interested in the following activities:

    • android:resizeableActivity="false"

    • android:hardwareAccelerated

    I also tried replacing configChanges with this option:

    • android:configChanges="orientation|keyboardHidden|screenSize" android:launchMode="singleTop"

    And this is not in the activity, but in the application section:

    • android:usesCleartextTraffic="true"

    Please tell me how to influence these parameters, especially using the first two as an example.

  • Well, for now the answer is "use the Android Studio" export option.

    What reason do you need to change those settings though? For example turning off resizableActivity should not be necessary, as Construct content generally supports any window size with its letterbox scaling mode. I don't think hardwareAccelerated affects much for Construct content - it always uses hardware-accelerated GPU rendering to the canvas regardless of that setting. Enabling usesCleartextTraffic sounds like a bad idea - you should just be using HTTPS for everything these days.

  • I'm just experimenting with implementing my site as an app. I wouldn't say it's a serious idea, but I'd like to know the engine's capabilities in this case. I use Scale Outer, not Letterbox.

    If the only option is exporting via Android Studio, then the second part of the topic's question is - if I make an Android Studio export and write changes there, is it possible to somehow pack the project back and continue working in Construct after changes?

  • No, exports are one-way (very much by design, as lots of people are concerned about their exported projects being reverse-engineered). You can however export and only extract the exported web assets, which I think end up in app\src\main\assets\www. That will update the project but preserve your existing Android Studio project. Note however if you do make a change that affects other parts of the Android Studio project, such as adding plugins or changing settings, this approach won't update the Android Studio project to match. So another approach could be to use source control and every time you export over your Android Studio project, you can review all the changes and decide which to keep and which to discard.

Jump to:
Active Users
There are 0 visitors browsing this topic (0 users and 0 guests)