Managing full device mode
Learn how to promote a session to full device mode using the SDK, as per your requirements.
Managing full device state from the SDKs
await session.setFullDevice('requested')session.setFullDevice(.requested)[session setFullDevice: CBIOFullDeviceStateRequested callback:nil];session.setFullDevice(Session.FullDeviceState.Requested, (err, arg) -> {
// handle error
});await session.setFullDevice(true)Session? session = await CobrowseIO.instance.currentSession();
if (session != null) {
try {
await session.setFullDevice(FullDeviceState.on);
} on PlatformException catch (e) {
// E.g. a network error
log('Cannot update the full device state: ${e.message}');
}
}Session session = CobrowseIO.Instance.CurrentSession;
if (session != null)
{
session.SetFullDevice(FullDeviceState.On, (err, session) =>
{
if (err != null)
{
// E.g. a network error
}
else
{
// Full device mode is activated
}
});
}CobrowseIO.on('session.loaded', session => session.setFullDevice('requested')) // You must have implmented the CobrowseIODelegate
func cobrowseSessionDidLoad(_ session: CBIOSession) {
session.setFullDevice(.requested)
}// You must have implmented the CobrowseIODelegate
- (void)cobrowseSessionDidLoad:(CBIOSession *)session {
[session setFullDevice: CBIOFullDeviceStateRequested callback:nil];
}// note: you must have implmented CobrowseIO.SessionLoadDelegate
@Override
public void sessionDidLoad(@NonNull Session session) {
session.setFullDevice(Session.FullDeviceState.Requested, null);
}CobrowseIO.addListener('session.loaded', session => {
console.log('A session was loaded', session)
await session.setFullDevice(true)
})Controlling full device state from the Agent SDK
Last updated