lordi / tickmate

One bit journal
GNU General Public License v3.0
111 stars 34 forks source link

Import and Export not working #142

Closed Thewisem closed 3 years ago

Thewisem commented 3 years ago

Running Android 7. Samsung Galaxt Tab A. Its not working for importing or exporting files

lordi commented 3 years ago

Is there an error message? It is probably a permission problem.

Thewisem commented 3 years ago

Hmmmmm Fun fact. It never asks for permission. At least not in my device

0xDB commented 3 years ago

Maybe the location you chose for export cannot be written to? Could you try to export to the Downloads folder and import from there? Extra Permissions should only be required to persist access to a file across reboots, which isn't necessary in this case.

It would help if you told us how far you get before an error occurs. Selecting either import or export should launch a file picker where you can select where to import from / export to. Can you choose a file or is something going wrong when launching the file picker?

Thewisem commented 3 years ago

Well

Thewisem commented 3 years ago

When I clicked export it instantly crashes with issues I have no idea of

Thewisem commented 3 years ago

Even importing makes it crash

Thewisem commented 3 years ago

And I can't change the location of where I am supposed to import or export

Thewisem commented 3 years ago

So I guess add a feature requirement of showing where the download location should be? Maybe

0xDB commented 3 years ago

I will set up an Android 7 emulator to test import and export, but I don't have a lot of spare time at the moment, so it will probably take some time. I will post here when I have some results/feedback.

Thewisem commented 3 years ago

One more thing, I may or may not have moved the file where it was supposed to backup once and then put it back. Maybe that's why I don't know

0xDB commented 3 years ago

Hi! Getting the Android 7 AVD to run was quicker than expected, however I can't reproduce your error as export and import just work. I'll attach the screen recording, maybe you can shed some light on how the process behaves differently on your device.

https://user-images.githubusercontent.com/1752307/110213843-16f6b200-7ea2-11eb-954f-1511ecc4a64d.mp4

Thewisem commented 3 years ago

I usually have 3

https://user-images.githubusercontent.com/74511929/110214060-df910100-7eb3-11eb-86c0-972979f89ebe.mp4

or 4 activities and do a lot of clicks. Maybe because of that.

lordi commented 3 years ago

It could have something todo with the track groups that you are using

@0xDB can you check exporting those with your AVD?

@Thewisem we didn't check that but you are running the latest version of tickmate right?

Thewisem commented 3 years ago

Yes

Thewisem commented 3 years ago

Version 1.4.9

0xDB commented 3 years ago

@lordi import and export of multiple groups and tracks works in the Android 7 AVD.

To me it looks like the ACTION_CREATE_DOCUMENT and ACTION_OPEN_DOCUMENT intents fail, as there is no opportunity to pick a file.

@Thewisem is it possible that you disabled the Samsung File Manager App (may also just be called "Files" or similar)?

Thewisem commented 3 years ago

Yes

Thewisem commented 3 years ago

I may or may not have uninstalled it

0xDB commented 3 years ago

Could you try to install/enable these file manager system apps and test import/export again?

My suspicion is that the activities mentioned before (which are part of the Android Storage Access Framework) are implemented within those apps. In this case, if these Apps are deactivated or removed, the functionality is no longer available and an uncaught ActivityNotFoundException would occur when invoking ACTION_CREATE_DOCUMENT or ACTION_OPEN_DOCUMENT and crash the app. A similar bug seems to have occurred on Xiaomi Devices previously.

Thewisem commented 3 years ago

Hmmm I guess I need to check my storage access framework. Seems my fault. Sorry

0xDB commented 3 years ago

No worries, please report back if this does not fix the problem so we can investigate the issue further. I'm keeping this issue open for now to add some error handling, so that the app will display an error message instead of force closing.

Thewisem commented 3 years ago

Yes. It was broken then. I had restarted my device and fixed it. But depending on SAF is kinda bad if someone made my mistake lol

Thewisem commented 3 years ago

I had uninstalled it. Making it asnine impossible for it to use those commands.