Commit graph

25 commits

Author SHA1 Message Date
Naveen Singh
f343085703
Clear drafts instead of deleting them
Closes https://github.com/FossifyOrg/Messages/issues/13
2025-01-04 03:23:59 +05:30
Naveen Singh
4434d187bc
Improve third party SMS/MMS intent parsing
Closes https://github.com/FossifyOrg/Messages/issues/243

Closes https://github.com/FossifyOrg/Messages/issues/217
2025-01-04 03:14:50 +05:30
Naveen Singh
f66aa77831
Show progress indicator when importing/exporting messages
One small step towards https://github.com/FossifyOrg/General-Discussion/issues/120
2025-01-04 01:16:49 +05:30
Naveen Singh
7eafa793c0
Move variables to the top 2025-01-03 22:11:41 +05:30
Naveen Singh
43c30eda08
Remove unnecessary check 2024-12-27 17:30:27 +05:30
Naveen Singh
787f4cb2e1
Clear typed messages for short codes 2024-12-27 16:39:53 +05:30
Naveen Singh
6fba0bfdd8
Clear drafts before saving new one
This may resolve https://github.com/FossifyOrg/Messages/issues/13
2024-12-27 15:35:19 +05:30
Naveen Singh
7d2b87adc1
Remove support for Android and older versions
See https://github.com/orgs/FossifyOrg/discussions/241
2024-12-26 14:09:12 +05:30
Naveen Singh
3f17c2d94c
Setup full screen app lock
- Updated commons
2024-12-26 13:16:44 +05:30
Naveen Singh
5683087ca0
Format code 2024-12-25 21:35:29 +05:30
Naveen Singh
025a3a2729
Merge branch 'master' into import_export_keywords 2024-12-25 20:46:51 +05:30
Naveen Singh
188e8f9ea4
Merge branch 'master' into json-streams 2024-12-25 18:10:09 +05:30
Naveen Singh
29520d5a2d
Construct import mime type based on API level
Format code.
2024-12-25 18:01:03 +05:30
Naveen Singh
8d306941a0
Merge branch 'master' into fix-import-binary-mime-type 2024-12-25 17:20:44 +05:30
Agnieszka C
48dcb05554 Added sorting blocked keywords (#256) 2024-12-08 09:50:49 +01:00
Tom Levy
a7edeae6f3 Use streams to encode and decode the JSON backups
This significantly reduces memory usage.

(We buffer the OutputStream because kotlinx.serialization flushes its
internal buffers excessively[1]. We also buffer the InputStream for
consistency, even though kotlinx.serialization uses adequate
buffering; there is no performance impact because BufferedInputStream
cascades harmlessly[2].)

The functions encodeToStream() and decodeFromStream() are marked as
experimental, but this is a pretty fundamental use case so surely it
will continue to be supported in the future (maybe with minor
changes).

Fixes #6.

[1] https://github.com/Kotlin/kotlinx.serialization/blob/v1.6.3/formats/json/jvmMain/src/kotlinx/serialization/json/internal/JvmJsonStreams.kt#L46
[2] https://github.com/openjdk/jdk/blob/jdk-23%2B14/src/java.base/share/classes/java/io/BufferedInputStream.java#L339
2024-05-20 01:43:25 +00:00
Tom Levy
b18e8aa11e Allow importing files with MIME type "application/octet-stream"
Sometimes Android reports the MIME type as "application/octet-stream"
even if the file has a .json extension (specifically, on Android 8 and
9 for backups exported outside the Download folder). Previously, such
files could not be selected in the file picker when importing.

As a workaround, allow files with that MIME type.

Fixes #88.
2024-05-20 01:43:25 +00:00
Tom Levy
7e2202b64a Fix missing .json file extension when exporting messages
Very similar to FossifyOrg/Notes#14 (which has a more detailed commit
message). Basically, some file pickers don't automatically append the
extension, so we should do it ourselves. It doesn't cause problems.

Reported in #88.
2024-05-20 01:43:25 +00:00
Tom Levy
9534a1031a Delete exported file on error
If ActivityResultContracts.CreateDocument launches the native Files
app (com.android.documentsui), then it will create the file before the
Uri is returned to us.

So if we don't complete the export (due to an exception or because
there are no messages) we should delete the file, otherwise there will
be an empty/incomplete file left behind.
2024-05-20 01:43:25 +00:00
Tom Levy
1198a8c495 Report OutOfMemoryError when importing and exporting messages
When importing/exporting large files we can run out of memory, in
which case we should display a toast to the user (as we do for other
exceptions). Previously, the OutOfMemoryError was not caught because
it inherits from Error, not from Exception.

(We have to manually call .toString() because Context.showErrorToast()
from Commons takes an Exception or a String, not Throwable.)
2024-05-20 01:43:25 +00:00
ronniedroid
c53f537b63 switched to using ActivityResultContracts 2024-04-29 12:01:17 +03:00
ronniedroid
958644b290 FEATURE: Import and export blocked keywords 2024-01-30 15:42:42 +03:00
Naveen
bc99df1ac8
Update app store metadata 2024-01-22 19:29:46 +05:30
Naveen
0bd9168f23
Remove "More apps from us" from menu 2024-01-20 00:28:56 +05:30
Naveen
e2f83f49da
Rename package to org.fossify.messages 2024-01-18 01:05:03 +05:30