Fix error when exporting notes to Google Drive

Use "rwt" mode instead of "wt" as the "wt" seems to not work with Google Drive.
See this: https://github.com/itinance/react-native-fs/pull/837#issuecomment-776677509
This commit is contained in:
Andrii Chubko 2021-09-13 05:07:56 +03:00
parent 578e845e1d
commit cbba53b798

View File

@ -880,7 +880,7 @@ class MainActivity : SimpleActivity() {
private fun exportNoteValueToUri(uri: Uri, content: String, callback: ((success: Boolean) -> Unit)? = null) {
try {
val outputStream = contentResolver.openOutputStream(uri, "wt")
val outputStream = contentResolver.openOutputStream(uri, "rwt")
outputStream!!.bufferedWriter().use { out ->
out.write(content)
}