fix(examples): one identity per install, Wi-Fi Direct without Bluetooth, and peers that stay listed - #508
Closed
kivtxs wants to merge 1 commit into
Closed
fix(examples): one identity per install, Wi-Fi Direct without Bluetooth, and peers that stay listed#508kivtxs wants to merge 1 commit into
kivtxs wants to merge 1 commit into
Conversation
…th, and peers that stay listed Found driving the demo on two Android phones for the v0.28 smoke test: - A new random profile per launch made every launch a new identity (and a new keystore namespace): contacts and sessions were lost on each restart. The profile is fixed, and userId is the device's off1 address from localAddress(), not the profile, which also fixes the header showing the wrong id, rosters listing this device twice, and outgoing group messages misattributed. Sessions restored on restart are seeded from mlsListSessions() so presence keeps flowing. - Neighbours were aged out after 60 s without a new neighbor_discovered, but the SDK announces a peer once per link and reports neighbor_lost when it ends, so live Bluetooth and Wi-Fi Direct peers vanished from People. - Onboarding required Bluetooth even with Wi-Fi Direct on; it no longer does on Android. Wi-Fi Direct is enabled on Android (autoAccept: true) and NEARBY_WIFI_DEVICES / fine location are requested as optional. - The header pill followed transport_switched, which the core also raises when a layer starts; it follows DORS's selection now. - KEY_PACKAGE_OUTSIDE_VALIDITY_WINDOW shows a "Check date and time" alert.
This was referenced Oct 5, 2026
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The demo app is what everyone uses to smoke-test the SDK on phones. Driving it on two Androids for v0.28 turned up several demo bugs that made the SDK look broken when it wasn't. Each one below was reproduced, fixed and re-checked on the phones (Infinix NOTE 12 on Android 13, Seeker on Android 15).
generateUserId()minted a random profile per onboarding.offline-demo; the SDK keeps its keys, so the address is stable across restarts.userIdwas the profile, while every event names theoff1…address.userIdcomes fromlocalAddress()afterstart(). Rosters now read 2 and 2.secure_session_established, so the contact never gothasSessionor presence.sessionPeersReffrommlsListSessions()at start.neighbor_discovered. The SDK announces a peer once per link and reportsneighbor_lostwhen it ends: Bluetooth after its reconnect attempts run out (about 4.75 min measured), Wi-Fi Direct when the stream closes.neighbor_lost. Measured: the peer stays listed past 2 min on both transports.NEARBY_WIFI_DEVICESwas never requested.wifiDirect: { enabled: Platform.OS === 'android', autoAccept: true }.NEARBY_WIFI_DEVICES(13+) or fine location (≤12) is requested as optional.transport_switched, which the core also raises when a layer starts.dors_transport_selected/dors_transport_switched.KEY_PACKAGE_OUTSIDE_VALIDITY_WINDOW: "Check date and time".Depends on
Typechecks and runs without these, but the Wi-Fi Direct and clock features need:
autoAcceptforms the group.Validated on the phones
tsc --noEmit: clean.