-
Notifications
You must be signed in to change notification settings - Fork 19
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
"Export notes" file doesn't have .json extension #13
Comments
Have you tested in on multiple real devices? Writing "All" under "Affected Android version" and "Affected device model" is a very bold statement. You should always write on what device you've really encountered it. I think, it may only affect specific Android versions. On Android 10 (Xiaomi Redmi 7A) and Android 13 (OnePlus 8 Pro, OnePlus 9 Pro) it saves with If someone were to fix this, there should be no UI change because similar UI is currently also in other apps. It should only fix that save always saves with proper extension. |
The UI dialog says "Filename (without .json)" and the default value doesn't have a .json suffix, so we are supposed to automatically append the file extension (as we already do for automatic backups). Fixes FossifyOrg#13.
Oops, I added device details (I did test on both a VM and a physical device, and thought it was just a trivial typo, but evidently I was wrong). I guess the file extension is added automatically, either by newer versions of Android or by the file manager app used to pick the destination. Can you please check that my proposed fix in #14 doesn't break things on the working devices that you've listed? (I'm worried about ending up with .json.json as the file extension, but I'm not able to test on those Android versions myself.) |
I don't mind it but can confirm that the .json extension is missing on my install (v6.17 of the app on Android 13). |
I did more testing and my conclusion is that the native Files app automatically adds the extension since Android 10 (tested on Android 9, 10, 14). Fossify File Manager never adds an extension (tested on Android 9, 10; couldn't test on Android 14 because it uses the native Files app without letting me choose Fossify File Manager). So I think the simplest solution is to always add the extension in the Notes app. It fixes the missing extension issue, and as far as I can tell it has no negative consequences -- it doesn't cause double extensions, and for duplicates, the versions of the Files app that can add the extension automatically (Android 10+) correctly insert the "(1)" before the extension even when the extension was added by the Notes app. |
Checklist
Affected app version
SimpleMobileTools 6.17.0 (since FossifyOrg Notes hasn't been released yet)
Affected Android/Custom ROM version
AllAndroid 9
Happens both when completing the save action using the native Files app and when using Fossfy File Manager.
Affected device model
AllAndroid-x86 VM
Also a physical device
How did you install the app?
F-Droid / IzzyOnDroid
Steps to reproduce the bug
In Settings, click "Export notes".
Observe that the prompt says "Filename (without .json)" and the pre-populated filename does not have a .json suffix.
Click OK. Pick a destination folder.
Expected behavior
The exported file should have a .json file extension.
Actual behavior
The exported file does not have a .json file extension.
Screenshots/Screen recordings
Additional information
Fixing this is
trivialhopefully trivial, but also raises the question of what should be changed:A. Obvious fix: Leave the UI as is, and automatically append ".json" when saving. (This is consistent with the automatic backup feature.) Implemented in #14.
B. Change the UI so the prompt is just "Filename" and the initial value includes a ".json" suffix. I like this, because it's simple and direct -- it shows the user that the output will be a .json file without the user having to stop and think (thought process: "What's the output format going to be? Wait, the tiny prompt says "without .json", meaning I don't write .json, meaning the app will probably automatically add .json, so the output is probably .json"). Also allows the user to easily pick a different file extension (e.g. .txt to allow viewing in text editor). However, this is inconsistent with the automatic backup and most of the other apps (e.g. the Calendar export prompt says "without .ics" and automatically appends .ics).
The text was updated successfully, but these errors were encountered: