Skip to content
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

local file sync feature #25

Merged
merged 2 commits into from Aug 14, 2022
Merged

Conversation

zoli
Copy link
Contributor

@zoli zoli commented Aug 13, 2022

Description

With adding relevant methods in common java interface this enables superproductivity local file sync feature to work in android platform.

One thing to note is that it probably be the case that superproductivity app won't be the owner of local file that we use to sync. So I needed to use ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION permission.

Issues Resolved

#13 and johannesjo/super-productivity#2001

@zoli
Copy link
Contributor Author

zoli commented Aug 13, 2022

This PR should get merged before johannesjo/super-productivity#2195

@johannesjo johannesjo merged commit 73cce92 into johannesjo:master Aug 14, 2022
@johannesjo
Copy link
Owner

Thank you @zoli ! I will test this on my device and make a new release, if everything works well.

@johannesjo
Copy link
Owner

@zoli hey there! Unfortunately there are problems with releasing the new version to the play store. I need to explain why we can't use the Storage Access Framework or the Media Store API and also to provide a video to showcase that functionality. Could you maybe help me with the explanation?

@zoli
Copy link
Contributor Author

zoli commented Aug 19, 2022

Unfortunately there are problems with releasing the new version to the play store.

Actually when I was reading about the permission stuff, I thought that there would be some problem to. But I forgot to mention it in the PR.

Could you maybe help me with the explanation?

Sure how can I help? By explaining why the permission is necessary?

@johannesjo
Copy link
Owner

Thanks! I thought that I would need help with the question why we can't use the Storage Access Framework or the Media Storage API, but briefly looking at them tells me that one is only for media files and the Storage Access Framework can't be used, because we need to access the file in the background.

In case we don't get greenlit with this, do you think there is another way to do this?

@zoli
Copy link
Contributor Author

zoli commented Aug 19, 2022

I'm not much familiar with android development ecosystem either. From what I've read superproductivity needs MANAGE_EXTERNAL_STORAGE permission because superproductivity itself doesn't provide syncing service and also because its probable that superproductivity won't be the owner of the file that is being shared between devices. The syncing service is the owner of the file (for example syncthing).

For read/write access to that file superproductivity needs MANAGE_EXTERNAL_STORAGE permission.

There is also some cases that will eliminate the MANAGE_EXTERNAL_STORAGE permission need for superproductivity and thats when the syncing service implements FileProvider. But from what I've seen FileProvider has not been much prevalent among syncing services or apps.

In case we don't get greenlit with this, do you think there is another way to do this?

Maybe we can force the user to use a file that is owned by superproductivity app and then the burden will be on the syncing service/app, but I'm not sure.

@zoli
Copy link
Contributor Author

zoli commented Aug 19, 2022

Also users which really need this feature (including myself) can install it directly via apk file or maybe fdroid.

@johannesjo
Copy link
Owner

Thanks for your input! I submitted a request. Not sure how they will respond.

Maybe we can force the user to use a file that is owned by superproductivity app and then the burden will be on the syncing service/app, but I'm not sure.

In case we don't get greenlit, this seems to me to be the best alternative.

@zoli zoli deleted the feat/13-localfile-sync branch August 25, 2022 10:31
@detectivepikachu
Copy link

Hello I downloaded it from the fdroid version but still cannot find the local sync option. Am I missing something here?

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.

None yet

3 participants