How can I add special permissions/metadata to AndroidManifest.xml?

G_o_d_o_tG_o_d_o_t Posts: 1Member
edited November 2016 in Programming

I know that I can turn permissions on and off at Export -> Project Export Settings -> Android -> Permissions.

But I need a special permission that I can't find there:
<uses-permission android:name= "com.samsung.android.providers.context.permission.WRITE_USE_APP_FEATURE_SURVEY"/>

Also I have to add a special multiwindow intent to the AndroidManifest.xml:

<activity
            android:name=".testapp"
            android:label="@string/app_name"
            android:configChanges="orientation|keyboardHidden|screenSize"
            >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
                <category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
            </intent-filter>
</activity>

And also have to add meta-data to the AndroidManifest.xml:

<uses-library android:required="false" android:name="com.sec.android.app.multiwindow" />
<meta-data android:name="com.samsung.android.sdk.multiwindow.multiinstance.enable" android:value="true" />
<meta-data android:name="com.samsung.android.sdk.multiwindow.enable" android:value="true" />
<meta-data android:name="com.samsung.android.sdk.multiwindow.penwindow.enable" android:value="true" />
<meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W" android:resource="@dimen/app_defaultsize_w" />
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H" android:resource="@dimen/app_defaultsize_h" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_W" android:resource="@dimen/app_minimumsize_w" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_H" android:resource="@dimen/app_minimumsize_h" />
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />

So is there a way to add these or other data to the AndroidManifest.xml that Godot creates before exporting the apk?


Tags :

Answers

  • Shin-NiLShin-NiL Posts: 49Moderator
    edited November 2016

    I'm afraid you'll need to compile a custom android template, doing so you can edit the file godot/platform/android/AndroidManifest.xml.template.

    I don't know if there are an easier way to achieve the same result, but it should work.

Sign In or Register to comment.