Skip to content

Conversation

mikoto2000
Copy link
Contributor

This is part of #1494. (Implementation of write text file for Android)
Separated #1591 for each plugin change.

NOTE: Please this PR merge after #1657

I implemented the save_text_file for the fs plugin.

As mentioned in the following two comments, saving files on Android requires the use of activity.getContentResolver().openOutputStream(uri), so I use Uri instead of file path in the communication between the app and the plugin.

Since the fs plugin requires the use of activity.getContentResolver().openOutputStream(uri), I've added an Android implementation to the fs plugin.

@mikoto2000 mikoto2000 requested a review from a team as a code owner August 13, 2024 04:09
@mikoto2000 mikoto2000 changed the title Implemented writeTextFile on Android. feat(fs): Implemented writeTextFile on Android. Aug 13, 2024
Copy link
Contributor

github-actions bot commented Aug 13, 2024

Package Changes Through 81dbaa5

There are 5 changes which include dialog with prerelease, dialog-js with prerelease, global-shortcut with prerelease, fs with prerelease, single-instance with prerelease

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
api-example 2.0.0-rc.1 2.0.0-rc.2
api-example-js 2.0.0-rc.1 2.0.0-rc.2
fs 2.0.0-rc.0 2.0.0-rc.1
dialog 2.0.0-rc.2 2.0.0-rc.3
dialog-js 2.0.0-rc.0 2.0.0-rc.1
global-shortcut 2.0.0-rc.1 2.0.0-rc.2
http 2.0.0-rc.0 2.0.0-rc.1
persisted-scope 2.0.0-rc.0 2.0.0-rc.1
single-instance 2.0.0-rc.0 2.0.0-rc.1

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@mikoto2000
Copy link
Contributor Author

Sorry.
I will fix check failings.

@lucasfernog lucasfernog changed the title feat(fs): Implemented writeTextFile on Android. feat(fs): resolve content URIs on Android Aug 19, 2024
Copy link

socket-security bot commented Aug 19, 2024

@lucasfernog
Copy link
Member

I've pushed a change to extend the approach for more file APIs (all the read, write, open APIs). We should add dedicated Android APIs for the other functions (reading a directory, renaming files, copying, etc).

@lucasfernog
Copy link
Member

This is exciting!!

@lucasfernog lucasfernog merged commit 448846b into tauri-apps:v2 Aug 23, 2024
154 of 156 checks passed
Sir-Thom pushed a commit to Sir-Thom/plugins-workspace that referenced this pull request Oct 22, 2024
* Implemented writeTextFile on Android.

* Added license headers.

* fix fmt checks.

* implement more file APIs

* change file

* cleanup

* refactor dialog plugin to leverage new FS APIs

* implement metadata functions

* fix build

* expose FS rust API

* resolve resources on android

* update pnpm

* update docs

---------

Co-authored-by: Lucas Nogueira <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants