-
Notifications
You must be signed in to change notification settings - Fork 506
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
Content providers #1119
base: master
Are you sure you want to change the base?
Content providers #1119
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good.
I think inclement was following this on Discord.
May I just ask you to add unit tests in tests/targets/test_android.py
. Buildozer coverage is already too low and I don't want things to get worst. So I'd like new feature to be covered.
Basically the test should simply check that the build command is reflected by your new parameters
Thank you, @AndreMiras! No problem, I will try to add some tests (: |
Thanks a mil! I'm happy to give some guidance if you need some help (I'm on Discord) |
I took the liberty to refactor the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done, yes I think the test refactoring makes sense the way you need it. Only added a minor comment.
I think the overall PR makes sense too and is good for a merge once the p4a one is merged kivy/python-for-android#2200
tests/targets/test_android.py
Outdated
""" | ||
self.temp_dir.cleanup() | ||
|
||
def init_target(self, options={}): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default mutable arguments is not recommended: https://docs.python-guide.org/writing/gotchas/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, fixed it (:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good thanks
Hi @pavelsof |
Hello @AndreMiras! Fair enough, I will make another PR later today then :) |
Thanks @pavelsof! |
This PR complements kivy/python-for-android#2200, adding two config options that can be used in
buildozer.spec
:android.manifest.content_providers
expects a path to a file, the contents of which will be inserted into the<application>
tag of the Android manifest.android.add_xml_resources
expects a list of file paths to be copied into thesrc/main/res/xml
subdirectory of the build, so that they can be referenced in the Android manifest.As an example of how it would look like from the viewpoint of a developer using Kivy, one may take a look at pavelsof/mobile-wormhole@d0c100e.