This is a B4i and B4A example, which demonstrates various external files related tasks.
The behavior is not exactly the same as the platforms capabilities and behavior are different.
B4A
Don't miss the manifest editor additions and ime in the main module.
B4i
A bit related B4J example: https://www.b4x.com/android/forum/threads/class-recent-files-manager.104633/post-822842
Updates:
- 9/2023 - Fixed an issue in B4A where overwriting existing files didn't trim file. Thanks @noeleon for reporting!
The behavior is not exactly the same as the platforms capabilities and behavior are different.
B4A
- Load external files, including online files, using ContentChooser.
- Save to an external target, using SaveAs: https://www.b4x.com/android/forum/t...list-of-other-related-methods.129897/#content
- Allow other apps to view text files using this app : Receiving shared images from other apps
- Extract information from the passed uri.
Don't miss the manifest editor additions and ime in the main module.
B4i
- Load external files, including online files, using DocumentPickerViewController: https://www.b4x.com/android/forum/t...ments-with-documentpickerviewcontroller.99365
- Share the text with ActivityViewController: https://www.b4x.com/android/forum/t...pp-with-activityviewcontroller.73159/#content
This also allows saving the text with the Files app. - Allow other apps to view text files using this app: https://www.b4x.com/android/forum/threads/open-external-files-with-your-app.50525/#content
A bit related B4J example: https://www.b4x.com/android/forum/threads/class-recent-files-manager.104633/post-822842
Updates:
- 9/2023 - Fixed an issue in B4A where overwriting existing files didn't trim file. Thanks @noeleon for reporting!
Attachments
Last edited: