You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/walletkit/android/usage.mdx
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -301,6 +301,19 @@ Web3Wallet.extendSession(extendParams) { error -> /*callback for error while ext
301
301
To extend a session, create a `Wallet.Params.SessionExtend` object with the session's topic to update the session with to `Web3Wallet.extendSession`. Session is
302
302
extended by 7 days.
303
303
304
+
### Emitting a Session
305
+
306
+
To emit an event, call emitSessionEvent() as follows:
307
+
308
+
```kotlin
309
+
val sessionTopic:String=/*Topic of Session*/
310
+
val event:Wallet.Model.SessiomEvent=SessionEvent(name ="accountsChanged", data ="0x000000000")
311
+
312
+
val sessionEmit =Wallet.Params.SessionEmit(topic = sessionTopic, chainId ="eip155:1", event = event)
313
+
314
+
Web3Wallet.emitSessionEvent(sessionEmit) { error ->/*callback for error while emiting an event*/ }
0 commit comments