playMaker

Author Topic: Playmaker adds PERMISSIONs to AndroidManifest.xml  (Read 6988 times)

MS80

  • Junior Playmaker
  • **
  • Posts: 64
Playmaker adds PERMISSIONs to AndroidManifest.xml
« on: July 25, 2014, 10:01:14 AM »
Yesterday I identified playmaker adds unwanted permissions to AndroidManifest.xml.

=> example:
I have a project without any playmaker asset imported, working and an existing AndroidManifest.xml (under Assets/Plugins/Android/) with some wanted permissions. If I publish this project everything works fine, the AndriodManifest.xml will stay the same and permissions are like expected!

Now I just import playmaker asset from asset store, without even using playmaker in my project (no fsm, no actions, nothing) and automatically these lines will be added to AndroidManifest.xml while publishing:


  <uses-permission android:name="android.permission.VIBRATE" />
  <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
  <uses-feature android:name="android.hardware.location.gps" android:required="false" />
  <uses-feature android:name="android.hardware.sensor.accelerometer" />
  <uses-feature android:name="android.hardware.touchscreen" />
  <uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false" />
  <uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="false" />


You can find the new one which will be used in your app under "assets/temp/StagingArea/", the old one is renamed to AndroidManifest-main.xml.

Why does Playmaker add all these permissions I dont use or want?
Problem is that publishing a apk make no sense any more because new manifest file will be used...
How to forbid playmaker to add anything to AndroidManifest.xml?

Thanks in advance!

« Last Edit: July 25, 2014, 10:04:11 AM by MS80 »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Playmaker adds PERMISSIONs to AndroidManifest.xml
« Reply #1 on: July 25, 2014, 11:49:13 AM »
Unity creates the AndroidManifest.xml file, I'm guessing based on all script files in the project. If you delete actions that use specific android features (e.g., Device Vibrate) it should remove the requirement from the manifest.

Or you could override the manifest file, for example:
http://drupal.technicat.com/games/unity/android/manifest.html

I don't have a lot of personal experience with manifest files, but maybe some android experts on the forum could offer more tips...

MS80

  • Junior Playmaker
  • **
  • Posts: 64
Re: Playmaker adds PERMISSIONs to AndroidManifest.xml
« Reply #2 on: July 25, 2014, 05:48:16 PM »
Thank you Alex!

I shouldn't blame playmaker, Unity was the bad boy!
You were right, deleting the actions remove the permissions... this was my second attempt, too!

Overriding the manifest file is possible, but brings no success! Each time the project is published the existing manifest file will be edited by Unity, including playmaker action permissions. Or did I get you wrong with your example?

Another solution could be to publish a android project and f.e edit the manifest file afterwards and then export a *.apk! But this is painful and disturbing...

4ppleseed

  • Full Member
  • ***
  • Posts: 226
Re: Playmaker adds PERMISSIONs to AndroidManifest.xml
« Reply #3 on: November 28, 2014, 05:03:01 AM »
Which actions from Playmaker should I delete to remove which permission??

Edit: Nevermind, found it:
http://hutonggames.com/playmakerforum/index.php?topic=4752.0
« Last Edit: November 28, 2014, 05:07:21 AM by 4ppleseed »