Skip to content

Network

Public surface (network): getStatus

type NetworkConnectionType = 'wifi' | 'cellular' | 'wired' | 'none'
interface NetworkStatus {
connected: boolean
type: NetworkConnectionType
}
getStatus(): Promise<NetworkStatus>
import mobilelocker from '@mobilelocker/javascript-sdk'
const { connected, type } = await mobilelocker.network.getStatus()
if (!connected) {
// show offline banner
}
Environment Behavior
Native app (isApp()) Host GET …/network/status (accurate connection type)
Browser / CDN navigator.onLine — approximate; may report online on captive portals. Type is 'wifi' when connected else 'none'