realm / realm-java

Realm is a mobile database: a replacement for SQLite & ORMs
http://realm.io
Apache License 2.0
11.45k stars 1.75k forks source link

Improve Template apps #7738

Closed sync-by-unito[bot] closed 1 year ago

sync-by-unito[bot] commented 1 year ago

We want to add two new features to the template apps for each SDK as this will make the apps easier to demo the value of flexible sync.

  1. Add a selector in the template where you can switch the subscription between the default which is give me Items where ownerId = userId 

https://github.com/mongodb-university/realm-template-apps/blob/main/swiftui/App/Item.swift#L8

To then a subscription that just gives me all completed tasks with my owner id where isCompleted is true -  https://github.com/mongodb-university/realm-template-apps/blob/main/swiftui/App/Item.swift#L5

The app should unsubscribe from the query and set the new subscription.

  1. Add an Airplane mode button to the app. Upon pressing this button the template should hit the syncSession pause button, the user will still be able to make local changes but it will not sync. Upon hitting the airplane button again, the syncSession resume API will be hit and all changes will be synced. You can see an example of this behavior here -  https://drive.google.com/file/d/1VdG20BB-o2kM8-QIxhKZM0VcES4TAjZM/view?usp=sharing

  2. Ensure best practices and make sure the UI is using the latest clean frameworks that don't bloat the code.

All template repos can be found here -  https://github.com/mongodb-university/realm-template-apps

sync-by-unito[bot] commented 1 year ago

➤ bmunkholm commented:

[~ian.ward@mongodb.com] Are we also updating the Java example app?

sync-by-unito[bot] commented 1 year ago

➤ Ian Ward commented:

there is no java template app - its only this one -

https://github.com/mongodb-university/realm-template-apps/tree/main/kotlin-sdk