How do I reference an image in Android manifest file?

0 favourites
  • 3 posts
From the Asset Store
Source File, music and art pack for Android Negotiator
  • I am trying to make a TV-compatible app, following these guidelines from Google:

    One of the requirements is a home screen banner:

     android:banner="@drawable/banner" >

    If I include banner image in Files or Icons folder in the C3 project, how do I reference it correctly in the manifest?

    I'm building with Cordova CLI, so maybe another option is to somehow add the banner file after exporting the project?


  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Manually

    Maybe it's possible to hardcode the location in your manifest after exporting the C3 project, if you can find this folder res/drawable/, then in the manifest you could put the image inside res/drawable/filename.png and try replacing in the manifest @drawable/banner with res/drawable/filename.png or @drawable/filename.png.

    C3 Files

    If you want to do it via C3, you can upload a file to Files in C3, it will be located directly in exported www\filename.png. You can try to reference that image from the exported folder by replacing @drawable/banner with www\filename.png, there's a possibility that it needs to be served via protocol like: http:\\www\filename.png

    Or the syntax could be @drawable/www/filename.png. Their docs are kind of weird so I'm guessing a bit here.

    I hope this helps in any form further, otherwise, at least the post got bumped a bit :)

  • I managed to build an app that works on TV and displays its icon in the Android TV Launcher. Google Play Store should allow this app to be installed on TVs, although I haven't tried it.

    Decided to leave the instructions here in case anyone else needs it. Not sure if my method is 100% correct, but hey, it works!


    Export your project for Android, choose "Cordova project" build type.


    Add this tag to the config.xml file:

    <preference name="AndroidXEnabled" value="true" />


    In Cordova CLI execute "cordova prepare" command.


    Make the following changes to \platforms\android\app\src\main\AndroidManifest.xml


    Add android:banner attribute to <application>:

    <application android:banner="@drawable/banner" ... >


    Replace android:theme attribute in <activity> tag:

    <activity .... android:theme="@style/Theme.Leanback" ... >


    Add a new intent-filter to the activity:

    <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LEANBACK_LAUNCHER" /> </intent-filter>


    Add these two keys to the root <manifest> tag:

    <uses-feature android:name="" android:required="false" /> <uses-feature android:name="android.hardware.touchscreen" android:required="false" />

    Here is what the result should look like:


    Edit \platforms\android\app\build.gradle file and add this line into the root dependencies section (around line 350)


    '1.2.0-alpha01' is the current version as of August 2021, you can lookup the latest version here.


    Create banner.png image (320x180 px) and copy it to this folder:


    and possibly to



    Continue building the app with Cordova CLI:

    cordova build android ...

    Please refer to the official guide for more info, and let me know if you notice any mistake in my post.

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