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

feat(android-filechooser): Implement save file method #728

Merged
merged 3 commits into from
Jan 6, 2023
Merged

feat(android-filechooser): Implement save file method #728

merged 3 commits into from
Jan 6, 2023

Conversation

leestarb
Copy link
Contributor

@leestarb leestarb commented Nov 13, 2022

This works like a charm!
Tested on: python 3.8.15; kivy 2.1.0; plyer 2.1.0; Android 13 on pure AOSP

Pros:

  • This doesn't need any permissions. Neither any manifest nor config changes (Absolutely no any).

  • Always uses the default file explorer in the system.

  • Purely native code approved by the Google's android guide.

  • The same code (but in Kotlin) tested with my production app on 5, 7, 9, 10, 12, 13 versions of Android.

  • This supports the default file name value as title argument.

  • Comfortable handling of the file output stream with the callback argument. Not so good due to the lack of type hints but there always are the java docs!

Cons:
Still uses deprecated onActivityResult (same as open_file does. I think this is not so bad (This also used on the Google's guide).

Improvements and tests are appreciated!

Closes #661 ;)

@misl6
Copy link
Member

misl6 commented Dec 10, 2022

Hi @leestarb !

Our style checks are failing on your PR, can you take care of it?

@leestarb
Copy link
Contributor Author

Hi @leestarb !

Our style checks are failing on your PR, can you take care of it?

Ok! This is just style issues

@leestarb
Copy link
Contributor Author

leestarb commented Jan 4, 2023

I"m sorry for being so late, but I did it. Now please approve the workflows, @misl6 🫠

Copy link
Member

@misl6 misl6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @leestarb

Please do not apply code styling to all the file (black), but just to the part you changed.

@leestarb
Copy link
Contributor Author

leestarb commented Jan 5, 2023

Hello @misl6 . Finally it is OK with the style of code!

@leestarb leestarb requested a review from misl6 January 5, 2023 10:59
Copy link
Member

@misl6 misl6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you!

Maybe you want to also add that functionality in our examples?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Problem: filechooser doesn't work on android
2 participants