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
Native
Skip to main content

Interface INetworkDiagnostic

interface INetworkDiagnostic
Extends com.amazon.apmf.IStandard Network diagnostic interface — allows apps to report network issues. Calling recordConnectionHealth() triggers a netsvc info dump that captures diagnostic state (interface status, WiFi metrics, connectivity, routing) at the time of the reported failure. Results are logged for offline analysis. This is a fire-and-forget interface. No diagnostic data is returned to the caller; netsvc rate-limits dumps internally and rapid repeated calls are silently dropped. Obtained from INetManager6::getNetworkDiagnostic(). Requires privilege: com.amazon.network.privilege.net-admin

Methods

recordConnectionHealth()

void recordConnectionHealth()
Report a network connectivity issue to netsvc. Call this when the app experiences a real network failure (DNS timeout, HTTP error, streaming stall, socket error). netsvc will capture a diagnostic state dump and may trigger ping tests to assess reachability. Caller disciplines:
  • Call only on actual failures, not speculatively or as a health poll.
  • Call once on first failure — do not call on every retry attempt.
  • Fire and forget — do not block on this, and do not retry.
  • This does not fix the network; apps must still handle their own recovery.
Rate limiting: netsvc rate-limits dumps internally. Rapid repeated calls are silently dropped (the call returns normally, but no dump is taken and no metric is emitted). Callers must not treat this as an error and must not retry.

Throws

  • NotSupportedError — if the feature is not compiled in (ACE_STATUS_NOT_SUPPORTED).
  • BaseError — on unexpected failure — check netsvc logs for details.

Last modified on October 29, 2026