Skip to main content

Objects

All types are exported and can be accessed via:

import {  } from '@react-native-tethering/hotspot';

Types

Network

ParamTypeDescription
ssidstringnetwork name
passwordstringrepresents the secret of the network

Device

ParamTypeDescription
ipAddressstringrepresents current ip address of a device
macAddressstringrepresents current mac address of a device
statusstringrepresents current status of a device in the network

TetheringError

An error class used to handle errors between native and js sides. An example of how to use it

try {
await setHotspotEnabled()
} catch(err: any) {
if (err instanceof TetheringError) {
// handle the error
}
}
ParamTypeDescription
codestringyou must use this code to handle every error
messagestringan error message of failure