Has content providers been incorporated in p4a?

38 views
Skip to first unread message

Henrik R.

unread,
Apr 6, 2022, 5:30:55 PM4/6/22
to Kivy users support
Hi!

The last time I compiled a new version of my Kivy app for Android I had to edit a personal copy of 'python-for-android-master' inserting the file provider_paths.xml here:

python-for-android-master/pythonforandroid/bootstraps/sdl2/build/src/main/res/xml/provider_paths.xml

Has p4a evolved since then, so I don't need a custom p4a?

I can find one pull request related to this: https://github.com/kivy/python-for-android/pull/2200
But nothing has happened there for a year, and now I need to debug and release a new version of my kivy app on Android.

Any help appreciated. Thank you.

Robert

unread,
Apr 6, 2022, 10:52:49 PM4/6/22
to Kivy users support
I think the whole content provider thing faded to irrelevance, turned out that the MediaStore can provide a uri.

Henrik R.

unread,
Apr 7, 2022, 7:41:06 AM4/7/22
to Kivy users support
Thank you for your reply!

So I guess 'sharesnd.py' in that package replaces the following methods that you created for me earlier, and which seem a bit from complex/'verbose':

class ShareBox(ScalableLabel):

    def create_file_intent(self, filepath, MIMEtype):
   
    def share_text_choose(self, data):
       
    def share_file_choose(self, filepath, MIMEtype):

    # HERE: Wrapper around self.share_file_choose(filepath, MIMEtype)
    def share_file(self, internal_filename, MIMEtype):

    def share_file_direct(self, filepath, MIMEtype, app):

Right now I think it's easier for me to just replace my old custom python-for-android-master with a customization of the newest version. I guess 'python-for-android-master.zip' on https://github.com/kivy/python-for-android/tree/master - is the best choice, and not 'develop.zip'. But what about 'stable' - https://github.com/kivy/python-for-android/tree/stable - is that old and obsolete?

I can see that the 'storage.py' in this package is the module that never worked on my MOTO G5 Android phone. And I never managed to get the simulators in Android Studio to work. And Google never really addressed that issue when I contacted them...

Henrik
Reply all
Reply to author
Forward
0 new messages