Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Skip to main content
With the react-native-netinfo API, you can access network connection information. The Vega-ported version of this library has a different package name: keplerscript-netmgr-lib.

Installation

Follow these steps to install keplerscript-netmgr-lib.
  1. Add the library dependency in your React Native for Vega application’s package.json:
  2. Add com.amazon.network.service to [wants.service] in your React Native for Vega app’s manifest.toml:
  3. Add API permission to [wants.privilege] in your React Native for Vega app’s manifest.toml:
  4. Reinstall dependencies using the npm install command.

API privileges

To access full API functionality, your app needs the com.amazon.network.privilege.net-info privilege. The user must grant this privilege at runtime. Without it, API responses are limited. To manage privileges:
  • Check the current privilege status using checkPrivilege("com.amazon.network.privilege.net-info").
  • Request user consent by calling requestPrivilege(), if needed.
For complete details, see the Security Manager API documentation.

Usage

The following code example shows how to query network status:

Methods

The fetch() and refresh() methods return NetInfoState to access the network connection information.

Props

Test on the simulator

You can test the network connection on the Vega Virtual Device by running the following commands.

Supported versions

For information on other libraries, see Supported Third-Party Libraries and Services.
Last modified on October 22, 2025