Android Geo location handling

I am trying to develop one android application.
Application requirement is find near by shops and search shops by name.

So i see realm sdk for android. Documentation also not clear what kind of data we need to put into model class. How model class upload into mongodb atlas. etc.

So, Can you please give some examples, How to add POJO object directly into our database.
How to search nearby shops and how naming field search via android sdk.

Maybe, if you don’t have any solution right now. Then please help how can we do that?
Like use AWS and connect to atlas db and use lambda function etc.

I am completely new with mongodb. If you have any end-to-end solutions please provide.

@Yogesh_Rathi You define your model classes by extending RealmObject -
https://docs.mongodb.com/realm/android/objects/

From there you open a synced realm using partitionKey field -
https://docs.mongodb.com/realm/android/sync-data/

And your data would then replicate to MongoDB Atlas.

You can then run a query based on store.name for instance which would be a string. For geolocation you can store lat and long as a double under the Store object fields and then compare that against a User object which has the current location lat/long

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.