Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.rebellapp.com/llms.txt

Use this file to discover all available pages before exploring further.

Get information about the current network connection.

Parameters

PropertyTypeRequiredDescription
successFunctionNoCallback with network type
failFunctionNoCallback on failure
completeFunctionNoCallback that always executes

Success Callback

PropertyTypeDescription
networkTypeStringNetwork type: WIFI, 2G, 3G, 4G, 5G, UNKNOWN, NONE
networkAvailableBooleanWhether network is available

Code Example

my.getNetworkType({
  success: (res) => {
    console.log('Network:', res.networkType);
    if (!res.networkAvailable) {
      my.showToast({ content: 'No network', type: 'fail' });
    }
  }
});