fossasia / susi_android

SUSI.AI Android App https://play.google.com/apps/testing/ai.susi
Apache License 2.0
2.42k stars 1.11k forks source link

Add synchronisation feature #1352

Open batbrain7 opened 6 years ago

batbrain7 commented 6 years ago

Actual Behaviour

Currently all the skills are fetched from the server, it takes a lot of time to fetch the skills.

Expected Behaviour

The skills should be downloaded offline and then the update should be run in the background and the updated skills should be reflected then.

Would you like to work on the issue?

yes

codedsun commented 6 years ago

@batbrain7 We can do this by SyncAdapter, I am taking this up! 👍

iamareebjamal commented 6 years ago

SyncAdapter is from when mobiles were the size of a room

Neither do we need to have the complex functionality of SyncAdapter, nor do we have time and energy to code and maintain that implementation

Use a simpler, modern solution.

codedsun commented 6 years ago

@iamareebjamal Can we then use work manager for that? What I read was to use alarm manager but I think work manager is more good than that, else suggest what is the best acc to you. Thanks.

iamareebjamal commented 6 years ago

WorkManager is in alpha and crashes right and left, use Android Job from evernote

codedsun commented 6 years ago

@iamareebjamal With respect to the implementation, how should I save the skills locally?

iamareebjamal commented 6 years ago

In db

codedsun commented 6 years ago

@iamareebjamal And while fetching it shouldn't hit the api directly, it should fetch from the DB and the job scheduler should update the DB with time?

iamareebjamal commented 6 years ago

Yes

atm1504 commented 5 years ago

@iamareebjamal @batbrain7 can I start working in this slowly?

iamareebjamal commented 5 years ago

Yes

atm1504 commented 5 years ago

@iamareebjamal can you please guide how to start working in this issue? Shall I use room persistence or sqlite database?

iamareebjamal commented 5 years ago

Both things you mentioned use SQLite

iamareebjamal commented 5 years ago

And we are already using Realm in the app

atm1504 commented 5 years ago

@iamareebjamal thank you sir. I am learning the stuffs and is working in this issue.

nikhil097 commented 4 years ago

@batbrain7 Can I work on this issue?

atm1504 commented 4 years ago

@nikhil097 go ahead

nikhil097 commented 4 years ago

Can i use Work Manager to implement this feature

iamareebjamal commented 4 years ago

First implement the fetching logic and storing and then we'll decide what scheduling library to use