Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple permissions in .p4a #673

Closed
brussee opened this issue Mar 5, 2016 · 3 comments
Closed

Multiple permissions in .p4a #673

brussee opened this issue Mar 5, 2016 · 3 comments

Comments

@brussee
Copy link
Contributor

brussee commented Mar 5, 2016

If I use --permission CAMERA,INTERNET just like with --requirements for recipes I get this error:

     [aapt] /home/paul/.local/share/python-for-android/dists/testproject/bin/AndroidManifest.xml:31: Tag <uses-permission> attribute name has invalid character ','.    

BUILD FAILED    
/home/paul/android-sdk-linux/tools/ant/build.xml:649: The following error occurred while executing this line:   
/home/paul/android-sdk-linux/tools/ant/build.xml:694: null returned: 1

This does work: --permission CAMERA --permission INTERNET but gets annoying for all the permissions I want.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@inclement
Copy link
Member

I see no major reason not to allow this (or maybe a --permissions), if someone would like to make a PR it should be fine.

@KeyWeeUsr
Copy link
Contributor

This could be probably closed after bdist is documented, as there is an option for multiple permissions in bdist since #898 and it makes a usage of p4a much more comportable:

python <file> apk

rather than:

p4a --to --infinity --and_beyond

😋

with a file constructed like this + after #965 you could just import the permission groups and put them into the dictionary like this:

from pythonforandroid import permissions as p
options = {'apk': {.......
               'permissions': p.SENSORS + p.NETWORK}}

@inclement
Copy link
Member

I'd like to make toolchain.py accept --permissions as well as just the bdist command.

KeyWeeUsr added a commit to KeyWeeUsr/python-for-android that referenced this issue Dec 20, 2016
When used with a single value -> ['param'], two or more values -> ['param1', 'param2'], two or more --permission args -> [['param1', 'param2'], ['param3', 'param4']] which is later flattened. Closes kivy#673
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants