materialistic icon indicating copy to clipboard operation
materialistic copied to clipboard

Sync user data across devices/with HN

Open materialistic-bot opened this issue 9 years ago • 14 comments

I use Materialistic on tablet and a phone and would love for my saved articles and what I have read to be in step on both devices. Unfortunately I don't code in Java so I can't contribute code. Device: Huawei Nexus 6P, SDK: 23, app version: 54

materialistic-bot avatar Jun 29 '16 22:06 materialistic-bot

Now that HN officially supports 'favorite', we can use that as a remote db to sync saved stories: https://news.ycombinator.com/item?id=12073675

hidroh avatar Jul 12 '16 07:07 hidroh

What about sync read articles, saved items and votes across devices with same HN login?

PhilipWith1L avatar Nov 12 '16 01:11 PhilipWith1L

Any kind of sync needs some sort of backend support. Since I don't have one I was looking at some makeshift solution, e.g. Google Drive, but it creates more problems than solving. Still parking this for now.

hidroh avatar Nov 12 '16 02:11 hidroh

Understood. Thanks for the quick reply! That makes sense. It's not an essential feature, just makes it easier to use the app on 2 different Android and same credentials. Reddit is fun seems to do this sometimes for my reddit account but not always.

PhilipWith1L avatar Nov 12 '16 15:11 PhilipWith1L

I don't know if there's any way to avoid having a backend, per-se. However, it needn't be that hard.

Have you considered using the AppData feature in Google Drive?

https://developers.google.com/drive/v3/web/appdata

It's basically a hidden folder in a user's Google Drive - you can use it for storing application-specific data. A bunch of other applications already use it (e.g. WhatsApps can use it for chat logs and video/audio backups, Arq Backup uses it to store your backups etc.)

Another option is Firebase Realtime Database:

https://firebase.google.com/docs/database/

which is basically a JSON-based document store - reasonably easy to integrate using the Firebase API, and it handles offline/realtime fairly well.

I'm pretty sure you know what you're doing =), but just in case feel free to ping me if you want to ask me anything (I'm part of our support engineering org for Google Drive).

victorhooi avatar May 05 '17 12:05 victorhooi

Cool. I did explore both options you mention. Google Drive makes more sense to me, as it's decentralized, it's also more private. The integration would require user to expose their Google account (which the app never asked), which may spook some users, but I guess those that want the integration would be willing to do so anyway.

A downside of this is the app will need to integrate with Google Play Services, which is not fully OSS. And the solution wouldn't work where it's not available, e.g. China.

hidroh avatar May 05 '17 13:05 hidroh

I know little about firebase, but also understand your concern as a developer about users suddenly seeing the ability for their G account to be exposed. I wish I knew more about Android apps to further contribute to this feature. It's unfortunate there are road blocks or indirect solutions to what would make these sort of apps more than an attractive container. I continue to use the app every day, btw!

PhilipWith1L avatar May 18 '17 00:05 PhilipWith1L

@hidroh Is the concern around user's granting permission for Google Drive to Materialistic?

That's a fair point. However, I think you simply need to make it clear when you request permissions what it's for.

Also - in modern Android versions, you don't need to request the permission on install - you can request it when the user sets up sync, for example. That means only users that explicitly try to enable sync will be prompted for that permission.

Would that be suitable?

victorhooi avatar Jun 04 '17 21:06 victorhooi

Of course the app will only ask for permission when user explicitly chooses to enable sync, not immediately when installed.

The concern is that you suddenly have to link your personal account (e.g. Google/Dropbox) in order for a news reader to sync your data, which sounds strange to me as a user. As the app developer I know I won't do something funny with your personal account (beside the fact that I can't!), but as an app user I can't help but raise my eyebrows 😅

hidroh avatar Jun 05 '17 09:06 hidroh

Having said ☝️ I'm still considering integration with Google Drive AppData, just don't have time to start yet.

hidroh avatar Jun 05 '17 09:06 hidroh

What about replicating the WhatsApp backup model:

  • the user selects a storage location among available "Device Storage" or "Document Storage" providers.
  • the user is then given an option:
    • perform a one-time or
    • enable recurring backups, with a user selectable interval. ?

tamsky avatar Oct 20 '18 05:10 tamsky

Why not replace Saved with Favorites and rely on HN favorites per user feature.

diimdeep avatar Nov 09 '18 00:11 diimdeep

Why not replace Saved with Favorites and rely on HN favorites per user feature.

I'm also thinking about this.

Or it will be wonderful if we had another button favorite, to save a story(the favorite feature from HN), this way if i'm using HN from my phone and from my desktop I can access them. Right now I don't know how to sync the desktop and the phone and it sucks.

chreniuc avatar Dec 29 '18 15:12 chreniuc

Is there still not a way to sync saved stories between desktop and mobile?

jac08h avatar May 19 '20 19:05 jac08h