This is a modifiable app to handle syncing with whatever server you want! So you don't have to change anything about each of the other apps, MangaWorld, AnimeWorld, NovelWorld. Right now, Firebase is being used for cloud syncing, however, that will soon be phased out. (Not sure when, just know its coming.) Since this cannot be used everywhere, this app was made. There is no official alternative right now that we can just switch to, however, this app gives you the tools to find a possible alternative. If someone wants to help and setup a server, we can work together on that, but until then, this is a warning.
The current setup is for the custom made server OtakuWorld Server. But anyone can modify this to point to any server they want as well as handle the data however they want. Syncing, the ui, whatever. BUT! This readme will explain how the basics of this works and why one might want to leave some things as is.
This project is set up with the Account Manager, a built in way to handle accounts in Android. This is set up for a number of reasons.
- We get access
to Sync Adapters!
- This means that whenever a favorite is added, removed, or modified, we will automatically sync with the server.
- You can manually sync with the server in a single place!
Each of the OtakuWorld apps are now equipped with Content Providers that OtakuWorld reads and writes to. This is what actually allows us to make the Sync Adapters work! We can view all of the data from each app in one place, in case you want to look at them without going to the actual app. This might seem a bit...unintuitive, and you are right! However, I wanted to make a ui in case I wanted to add some settings or any other interesting stuff.
Really? Only two things. I know that sounds easy, but there is a lot more to it.
Modify the ServerHandling class in the ServerHandler file. Set it up however you want to get and push data to the server.
Modify the LoginActivity however you want to make sure the UI is how you like it to log in!
If you want a different sync strategy, that's completely fine! All you really need to do is:
- Go to the FavoritesSyncAdapter and change the sync strategy to however you want!
- Go to the ListSyncAdapter and change the sync strategy to however you want!