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

Поделиться
HTML-код
  • Опубликовано: 15 июл 2024
  • 🌟Full Course - Build a Multi-Modular, Industry Ready Android app with Kotlin, Authentication and a MongoDB's Device Sync for a Synchronized Database: stevdza-san.com/p/multi-modul...
    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!
    💻 Source Code: github.com/stevdza-san/MongoD...
    ⌚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

Комментарии • 32

  • @raymondmichael4987
    @raymondmichael4987 Год назад +3

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

  • @mikelantzelo
    @mikelantzelo Год назад +1

    Thank you!!!

  • @nfaical3
    @nfaical3 Год назад +1

    Thanks a lot 🙂

  • @AndrewDChristie
    @AndrewDChristie Год назад

    Thanks!

  • @PandaTop.
    @PandaTop. Год назад +1

    Дякую!

  • @FOTACON
    @FOTACON Год назад

    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 ("userID":"%%user.custom_data.userID") and ikon fiti. Your data will be synced

  • @raymondmichael4987
    @raymondmichael4987 Год назад +1

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

  • @yuhenteng4694
    @yuhenteng4694 Год назад +1

    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😂

  • @oleksandrlevytskyi733
    @oleksandrlevytskyi733 2 месяца назад

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

  • @MonichGPT
    @MonichGPT 5 месяцев назад

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

  • @harshwavikar99
    @harshwavikar99 Год назад

    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 .

  • @criticalAY0
    @criticalAY0 9 месяцев назад

    Hey why dont you create a discord server, great content

  • @ninjaballista5003
    @ninjaballista5003 Год назад

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

    • @raymondmichael4987
      @raymondmichael4987 Год назад +1

      Basically, you won’t!
      For Mongodb Realm Sync to work authentication plans must be in place, for your situation, best bet is to use anonymous authentication, and then you can link the user with any other providers later (email/password, google, etc). Mostly for letting users test your app before creating an actual account.
      I believe I’m correct 😉

    • @StevdzaSan
      @StevdzaSan  Год назад +2

      @@raymondmichael4987 Yes that's correct, good answer. :)

    • @raymondmichael4987
      @raymondmichael4987 Год назад

      @@StevdzaSan thanks

    • @mubaraknative
      @mubaraknative 11 месяцев назад

      @@raymondmichael4987 I will use mongoDb intead of firebase ? what about plan's compared to firebase

  • @kuromujou1346
    @kuromujou1346 2 месяца назад

    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?

  • @waheedg1644
    @waheedg1644 Год назад

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

    • @StevdzaSan
      @StevdzaSan  Год назад

      For a file storage you would want to check firebase storage instead.

    • @waheedg1644
      @waheedg1644 Год назад

      @@StevdzaSan does monogodb support uploading or downloading documents?

    • @StevdzaSan
      @StevdzaSan  Год назад

      @@waheedg1644 I haven't done that so far. But you can check this link for further information: www.mongodb.com/docs/manual/core/gridfs/

    • @waheedg1644
      @waheedg1644 Год назад

      @@StevdzaSan thanks

  • @ShubhamGupta-iw6hc
    @ShubhamGupta-iw6hc Год назад

    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

    • @StevdzaSan
      @StevdzaSan  Год назад

      In that case, you should use an anonymous authentication .

    • @ShubhamGupta-iw6hc
      @ShubhamGupta-iw6hc Год назад

      @@StevdzaSan Yeah I'm using anonymous auth also in rules I have declared readWriteAll

    • @StevdzaSan
      @StevdzaSan  Год назад +1

      @@ShubhamGupta-iw6hc Check your logs on Atlas. Also try terminating and relaunching the sync service.

  • @soulkeeper4756
    @soulkeeper4756 Год назад

    Hi, I ran into the problem java.lang.IllegalArgumentException: 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?

  • @AndrewDChristie
    @AndrewDChristie Год назад

    Thanks!

  • @AndrewDChristie
    @AndrewDChristie Год назад

    Thanks!

  • @AndrewDChristie
    @AndrewDChristie Год назад

    Thanks!