Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

react-native-audio-observer

Latest version: v0.1.0

Overview

Last scanned
28 Nov 2026
Published
28 Nov 2026
npm package Publisher: adrianavramr
0 Stars
0 Forks
2 Versions
TypeScript Repo language

Scan summary

react-native-audio-observer was last scanned on 28 Nov 2026 at version 0.1.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 2 versions, all published on 28 Nov 2026.
  • Findings: No rules fired in version 0.1.0.

Versions

2 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.1.0 LATEST 28 Nov 2026 No rules fired
0.0.0-stage 28 Nov 2026 Not shown

No rules fired in 0.1.0

Findings

Findings for v0.1.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.1.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

react-native-audio-observer

Observe-only call and audio events for React Native (call state, audio route, other audio on iOS, media playback on Android) on iOS and Android

Use cases

  • Anti-fraud: detect an active call during a bank transfer.
  • Online exams: detect a call or headphones during an exam.
  • Media: react when the headphones change or other audio starts. Each platform has many limits here, so read LIMITATIONS.md first.

Alternatives

Library Main job Changes the audio session Extra setup
react-native-audio-observer Observe calls, audio route and other apps' audio No None
react-native-audio-api Play and process audio (Web Audio API) Yes Might be needed
react-native-incall-manager Audio during your app's own calls (WebRTC, VoIP) Yes Might be needed
react-native-nitro-call-detector Detect phone calls, VoIP opt-in No Nitro Modules
  • We recommend this library when you only need to know what is happening (a call, headphones, other audio) without changing anything.
  • We recommend react-native-audio-api when your app plays or processes audio itself.
  • We recommend react-native-incall-manager if your app has its own WebRTC calls and you need to control the sound: speaker, headphones, ringtone.
  • We recommend react-native-nitro-call-detector when you already use Nitro and only need call detection.

Based on some research on other audio libraries, November 2026.

Requirements

  • React Native with the New Architecture (the module is a TurboModule).
  • Android: minSdkVersion 24. Some events need a newer API level (see Events).
  • No permissions and no Info.plist keys.

Installation

npm install react-native-audio-observer
cd ios && pod install

Events

Event Values iOS Android
call ringing, connected, ended ✓ API 31+
audioRoute { routes }, each one bluetooth, wired, speaker or unknown ✓ API 33+
otherAudio started, stopped (audio from another app) ✓ –
mediaPlayback started, stopped (any media, your app's included) – API 26+

Usage

import AudioObserver, { addListener } from 'react-native-audio-observer';

// 1. Add the listener first.
const subscription = addListener('audioRoute', ({ routes }) => {
  console.log('audioRoute changed', routes);
});

// 2. Then read the initial state.
const routes = await AudioObserver.getAudioRoutesAsync();

// Later
subscription.remove();

In a component, subscribe in useEffect and remove the subscription on unmount:

useEffect(() => {
  let useInitial = true;

  // 1. Add the listener first.
  const subscription = addListener('audioRoute', ({ routes }) => {
    useInitial = false; // an event is newer than the initial read
    setRoutes(routes);
  });

  // 2. Then read the initial state.
  const readInitialRoutes = async () => {
    try {
      const routes = await AudioObserver.getAudioRoutesAsync();
      if (useInitial) setRoutes(routes);
    } catch {
      // ERR_UNSUPPORTED below Android API 33
    }
  };
  readInitialRoutes();

  // 3. Remove it on unmount.
  return () => subscription.remove();
}, []);

Calling remove() more than once is safe.

Not every event exists on every platform and API level (see LIMITATIONS.md), so check isAvailableAsync() before addListener. If the listener can't receive events (the event isn't available, or the system refused to start observing it), the module logs a warning. To handle the error yourself instead, for example to send it to Sentry, pass onError: addListener('call', onCall, { onError: (e) => Sentry.captureException(e) }).

Order matters. Events are emitted only when the state changes, never for the initial state. To miss nothing, add the listener first and read the initial state after it (for example isInCallAsync() or getAudioRoutesAsync()). Reading it before addListener leaves a gap where a change is lost.

Never interrupts playback. The module only observes: it never requests audio focus on Android and never activates the audio session on iOS, so it never pauses or ducks any app.

See LIMITATIONS.md for platform limits.

API

Function Returns Platform
addListener(event, listener, options?) { remove() } both
isAvailableAsync(event) Promise<boolean> both
isInCallAsync() Promise<boolean> both
getAudioRoutesAsync() Promise<AudioRoute[]> both
isOtherAudioPlayingAsync() Promise<boolean> iOS
isMediaPlaybackActiveAsync() Promise<boolean> Android

The read functions return the current state once, with or without a listener. They reject with code ERR_UNSUPPORTED when the event isn't available on the platform or Android API level.

The event types are exported too: CallEvent, AudioRouteEvent, AudioRoute, OtherAudioEvent, MediaPlaybackEvent.

Privacy

The package collects no data. Everything is detected on the device, and nothing is sent anywhere. It never reads phone numbers or audio content, so it needs no privacy manifest of its own.

If your app sends these events to a server, that is data your app collects. Declare it in your app's privacy manifest and in the Google Play Data safety form.

Contributing

See CONTRIBUTING.md.

License

MIT


Made with create-react-native-library

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm react-native-audio-observer

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Frame 2085668439 (1)
Group 1261154229