Software Archive
Read-only legacy content
17061 Discussions

Modify Android manifest?

Tim_A_2
Beginner
517 Views

Hi - I'm trying to build an app for the Amazon Fire TV box / stick (exclusively) and I'm running into a problem with the Amazon ingestion system, basically it's refusing to show options for publishing to the Fire TV because it is touch screen enabled.  They suggest adding the following line to the Android manifest:

 

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

However I can't work out how to do this.  It seems there's no easy way to do this in XDK and you have to create a dummy plugin - however I don't have a clue how to do this!  I tried creating a XML file using the example given on the FAQ page (https://software.intel.com/en-us/xdk/faqs/general), it seemed to add the plugin OK, but the build then failed.  Also I wouldn't know where to add the line above within that code anyway - even without the line the build failed, so I'm missing something.

Is there any simple way of making this tiny change to the manifest?!  Thanks!

 

 

0 Kudos
2 Replies
PaulF_IntelCorp
Employee
517 Views

I have not tested this nor have I looked to see where in the Android Manifest file your statement belongs, so this may or may not work, but it should get you started:

<?xml version="1.0" encoding="UTF-8"?>  
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" id="my-custom-plugin" version="1.0.0"> 

    <name>My Custom Plugin</name> 
    <description>Add to the AndroidManifest.xml</description> 
    <license>MIT</license> 

    <engines> 
        <engine name="cordova" version=">=3.0.0" /> 
    </engines>  

    <!-- android --> 
    <platform name="android"> 
        <config-file target="AndroidManifest.xml" parent="/manifest/application"> 
            <uses-feature android:name="android.hardware.touchscreen" android:required="false" /> 
        </config-file> 
    </platform>  
</plugin>

 

0 Kudos
Tim_A_2
Beginner
517 Views

Hi - thanks Paul - I got the plugin working as far as the build is concerned (i.e. the build works) but unfortunately it doesn't seem to have the desired effect on the actual manifest.  I'm not sure where else to put that line, it seems that's the only place for it!

0 Kudos
Reply