Must I use MongoDB Realm for my android app?

Hi everyone,

I converted my Reactjs website into an Android app with a capacitor and when I run it, it only shows the website interface design. It can’t seem to connect to the mongod database because it didn’t show the profile picture and I can’t login when I tried to login. How to fix this problem? I already added a mongo java driver in my android code but it still fails.
Thanks.