forked from mongodb/docs-realm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DOCSP-32918: Document .reconnect() for Kotlin SDK (mongodb#3005)
## Pull Request Info Add `App.Sync.reconnect()` method to existing page > NOTE: the related `app.sync.waitForSessionsToTerminate()` method is purposefully omitted until it's confirmed to be working as expected and ready to be documented ### Jira - https://jira.mongodb.org/browse/DOCSP-32198 ### Staged Changes - [Manage a Sync Session - Kotlin SDK](https://docs-mongodbcom-staging.corp.mongodb.com/realm/docsworker-xlarge/docsp-32918-sync-reconnect/sdk/kotlin/sync/manage-sync-session/) ### Reminder Checklist If your PR modifies the docs, you might need to also update some corresponding pages. Check if completed or N/A. - [x] Create Jira ticket for corresponding docs-app-services update(s), if any - [x] Checked/updated Admin API - [x] Checked/updated CLI reference ### Review Guidelines [REVIEWING.md](https://github.com/mongodb/docs-realm/blob/master/REVIEWING.md) --------- Co-authored-by: Dachary <dc@dacharycarey.com>
- Loading branch information
1 parent
f970475
commit 8c8747a
Showing
5 changed files
with
140 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
source/examples/generated/kotlin/ManageSyncSession.snippet.app-sync-reconnect.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
app.sync.reconnect() |
12 changes: 12 additions & 0 deletions
12
source/examples/generated/kotlin/ManageSyncSession.snippet.open-sync-session.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
val app = App.create(YOUR_APP_ID) | ||
val user = app.login(credentials) | ||
val config = SyncConfiguration.Builder(user, setOf(Task::class)) | ||
.build() | ||
|
||
// Open the synced realm | ||
val realm = Realm.open(config) | ||
|
||
// Sync session is now active | ||
|
||
// ... do something with the synced realm | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters