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

Allow app to sync data across devices #702

Open
9 of 22 tasks
iSoron opened this issue Jan 2, 2021 · 12 comments
Open
9 of 22 tasks

Allow app to sync data across devices #702

iSoron opened this issue Jan 2, 2021 · 12 comments
Assignees
Labels
new-feature Completely new app functionality
Milestone

Comments

@iSoron
Copy link
Owner

iSoron commented Jan 2, 2021

Description

This feature allows the user to keep track of the same set of habits in two different devices (e.g. a phone and a tablet).

A preliminary version of this feature was released in Loop 2.0.0-alpha, but it was removed in later versions because it was not sufficiently polished. This issue tracks remaining tasks that need to be done before this feature is released to a wider audience.

Subtasks

  • Cryptography: Implement master key generation
  • Cryptography: Implement sub key derivation
  • Cryptography: Implement BIP 39 encoding and decoding
  • Server: Put data
  • Server: Get data
  • Client UI: Generate new code
  • Client UI: Enter existing code
  • Client UI: View code
  • Client UI: Disable sync
  • Client: Encrypt database
  • Client: Upload database
  • Client: Fetch database
  • Client: Fix habit deletion
  • Server: Stop registrations if repository exceeds specified size
  • Server: Enforce maximum upload size
  • Server: Enforce valid keys
  • Client: Notify user that sync has been disabled due to unknown error
  • Client: Automatically re-upload data if decryption fails
  • Client: Display last sync timestamp in settings
  • Write docs/SYNC.md explaining sync protocol
  • Update privacy policy
  • Update main app description
@iSoron iSoron added the new-feature Completely new app functionality label Jan 2, 2021
@iSoron iSoron added this to the Loop 2.0 milestone Jan 2, 2021
@iSoron iSoron self-assigned this Jan 2, 2021
Repository owner locked and limited conversation to collaborators Jan 2, 2021
@iSoron iSoron modified the milestones: Loop 2.0, Loop 2.1 Apr 18, 2021
Repository owner unlocked this conversation Aug 22, 2021
@iSoron iSoron modified the milestones: Loop 2.1, Loop 2.2 Dec 29, 2021
@hobgoblina
Copy link

@iSoron Would it be possible to add a "set the data directory" setting so users could set up their own sync capability via services like Syncthing?

Could be a quick way to enable sync for some users while a native sync feature is still being developed.

@dessalines
Copy link

2nd @necropolina 's suggestion. I looked in the Android/data/org.isoron.uhabits folder, and didn't find any files other than explicit backups.... where is the data currently stored?

@fairyex
Copy link

fairyex commented Sep 28, 2022

@iSoron webdav might be a good solution.

@fairyex
Copy link

fairyex commented Sep 28, 2022

2nd @necropolina 's suggestion. I looked in the Android/data/org.isoron.uhabits folder, and didn't find any files other than explicit backups.... where is the data currently stored?

/data/data/, You cannot ascess it without root

@snoweuph
Copy link

@iSoron webdav might be a good solution.

Yea, using webdav would also make it nextcloud compatible, would love that.

@SkypLabs
Copy link

In the GitHub Discussion related to this topic, I suggested the use of Etebase: #104 (reply in thread).

@lkraav
Copy link

lkraav commented Mar 12, 2023

2nd @necropolina 's suggestion. I looked in the Android/data/org.isoron.uhabits folder, and didn't find any files other than explicit backups.... where is the data currently stored?

/data/data/, You cannot ascess it without root

Also in #104 (comment)

This implementation would require Loop to store the database in a public folder. Besides the security and privacy implications of this decision, it should also be noted that Android in general is moving away from such practice. It's not clear if this solution would still work after Android Q.

Do you think @iSoron you could be persuaded to accept a PR to make database storage location a user preference?

Even though I have a rooted phone (Sailfish OS ftw) and can access /data/data/org.isoron.uhabits/databases/uhabits.db with root credentials, it's a bit of jumping through hoops, and many cannot do this at all.

This would unlock people using the app to make progress on their goals and issues via syncing the database file wherever they want via many mature 3rd party tools, while a more granular sync UX is under construction, with an unknown landing date (year even).

My use case: connect synced SQLite uhabits DB to an analytics tool like Metabase, to provide better daily parameter clarity to my health consultant to chase some health stuff. Isolating variables is a real challenge, and low-barrier tracking of inputs (habits) is something uHabits does really well 💪

@fillwithjoy1
Copy link

2nd @necropolina 's suggestion. I looked in the Android/data/org.isoron.uhabits folder, and didn't find any files other than explicit backups.... where is the data currently stored?

/data/data/, You cannot ascess it without root

Also in #104 (comment)

This implementation would require Loop to store the database in a public folder. Besides the security and privacy implications of this decision, it should also be noted that Android in general is moving away from such practice. It's not clear if this solution would still work after Android Q.

Do you think @iSoron you could be persuaded to accept a PR to make database storage location a user preference?

Even though I have a rooted phone (Sailfish OS ftw) and can access /data/data/org.isoron.uhabits/databases/uhabits.db with root credentials, it's a bit of jumping through hoops, and many cannot do this at all.

This would unlock people using the app to make progress on their goals and issues via syncing the database file wherever they want via many mature 3rd party tools, while a more granular sync UX is under construction, with an unknown landing date (year even).

My use case: connect synced SQLite uhabits DB to an analytics tool like Metabase, to provide better daily parameter clarity to my health consultant to chase some health stuff. Isolating variables is a real challenge, and low-barrier tracking of inputs (habits) is something uHabits does really well 💪

Currently I'm using "Save a Copy" by Rikka to save it to my downloads folder, but yeah the exporting data is a lot of hoops to jump through

@jruiz94
Copy link

jruiz94 commented Feb 3, 2024

I agree with @lkraav , this syncing would be super easily implemented by just letting the users set a storage location so they can then use Syncthing for example to synchronize the habits.

This is pretty similar to what apps like Aegis do. In the particular case of Aegis, it lets you set a folder where automatic backups of your 2FA codes wil be stored on every change you make. You can then later set that folder to be synced with Syncthing.

@brog-io
Copy link

brog-io commented Sep 29, 2024

Hey, is there any update on this issue? It's very important to me since I love this app, but I'm afraid I'll lose my data

@Chickensoupwithrice
Copy link

Chickensoupwithrice commented Oct 22, 2024

If uHabits is already using sqlite, could something like cr-sqlite be a solution here?

Optionally allowing users to host a websocket server to manage their own sync would be awesome.

You could conceivably charge money for a happy path for those who do not want to self host. Make uHabits sustainable! :)

@Jefnull
Copy link

Jefnull commented Jan 28, 2025

Are there any updates? I would happily pay for this feature. I love this app, but I need sync between my devices. I can't find any alternative apps that work quite the same. if there's anything we can do to accelerate this development, that would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature Completely new app functionality
Projects
None yet
Development

No branches or pull requests