Full Guide to MongoDB's Device Sync Service for a Data Synchronization - Android (Kotlin SDK)

preview_player
Показать описание


This will be a full guide on how to use a Mongo DB's Device Sync service for synchronizing the data between a client(Android) and a server(MongoDB Atlas).

MongoDB has a great SDK that will do all the heavy lifting for you. Data is automatically synced when there's an internet connection. The setup process can be a bit tedious, but the end result is amazing! Be sure to watch the whole video if you want to learn everything about it!

LIKE and COMMENT the video if you appreciate the content!

⌚Timestamps
0:00 - Introduction
4:15 - Setup MongoDB Atlas
10:34 - Authentication Setup
15:37 - Enable Device Sync
20:04 - Project Overview
21:55 - Why we don't need a Dagger-Hilt module?
22:57 - Singleton for interacting with the database
27:14 - Person Collection and Embedded objects
28:30 - Application Navigation
31:24 - Automatically Generate the Schema on Atlas
34:49 - Conclusion
Рекомендации по теме
Комментарии
Автор

Man !! You deliver beyond expectations, for that I Saluti you.

raymondmichael
Автор

Its simple makes generate a schema from a sample document in your collection, set up the rules for each collection (in apply when makes sure you use operators such as( "%%user.custom_data.userID":{"%exists":true}, in write specify what fields will be used to identify data to be synced e.g and ikon fiti. Your data will be synced

FOTACON
Автор

Been thinking, how to use flexible sync with this app 😊

raymondmichael
Автор

I have tried realm. I must admit it is much easier to implement a local database. However, when I change some codes, run the program will crash. I have to clean the project to run again. I don’t know whether it is the problem of realm, since I have never faced such issue using room😂

yuhenteng
Автор

How to sync data with group of users with different accounts but shared data for their group?

MonichGPT
Автор

But the most crutial are Embedded realm objects...especially convertation RealmList to List an back... :)

oleksandrlevytskyi
Автор

i encounter “Google Account not Found.” message. i tried in both emulator and real device and still the same, how can i fix that bug?

kuromujou
Автор

Please can you make this app using Xml. I followed creating the app using Xml, It was a success with local database, Thanks to you, I was able to learn realm and storing the data local database. Do consider my request also please reply .

harshwavikar
Автор

Hey why dont you create a discord server, great content

criticalAY
Автор

How would you go about saving data locally before authentication, and synchronizing data after authentication?

ninjaballista
Автор

I have one issue, when I'm trying to save an object to the mongodb if I provide userId then it stores the data but if not then it gives sync error and also for retrieving the data only logged in user's data is fetched but I want to an object which can be accessed by any user

ShubhamGupta-iwhc
Автор

Could you make a video on how to deal with(e.g upload etc) documents or pdf files to MongoDB

waheedg
Автор

Hi, I ran into the problem Only subclasses of RealmObject and EmbeddedRealmObject are allowed in the schema. despite the fact that the code is identical to yours, maybe you can tell me how to fix it?

soulkeeper