Stencyl 3.4.0 is now out. Get it now!

Modifying AndroidManifest.xml - adding and removing permissions

yoplalala

  • *
  • Posts: 1389
Android Manifest - removing or adding specific permissions





Modifying the AndroidManifest.xml

You can modify directly the file in Stencyl\plaf\haxe\lib\lime\lime\templates\android\template
But the problem is that if you have multiple games, you don't want to modify every time the file

So copy the file somewhere else (I put it in my own game folder) and modify it there.

__  removing All Permissions _____
Delete or comment these lines
Code: [Select]
::if (ANDROID_PERMISSIONS != null)::::foreach ANDROID_PERMISSIONS::
<uses-permission android:name="::__current__::" />::end::::end::
__ adding Permissions ______
Add the permissions you want where were the lines
Code: [Select]
<uses-permission android:name="android.permission.VIBRATE" />



Modifying the Settings

Then in the game settings, put the openfl flag in Settings/Advanced

Code: [Select]
<template path="_PATH_/AndroidManifest.xml" rename="AndroidManifest.xml" if ="android" />Replace _PATH_ by the path where you put your modified  AndroidManifest  .

You can also use these variables
"[STENCYL_PATH]"  is the path where Stencyl is installed
"[EXTENSIONS_BASE]" is the path /plaf/haxe/extensions/ in Stencyl

Thanks to @danielle53

« Last Edit: March 10, 2017, 07:49:10 am by yoplalala »