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 in your React Native for Vega application.
  1. Add the library dependency to package.json:
  2. Add com.amazon.network.service to [wants.service] in your manifest.toml file:
  3. Add API permission to [wants.privilege] in your manifest.toml file:
  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. This privilege must be granted by the user 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.

Examples

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 a simulator

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

Supported versions

Supported Third-Party Libraries and Services.
Last modified on October 22, 2025