npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

expo-beacon

v1.0.5

Published

Expo module for scanning, pairing, and monitoring iBeacons on Android and iOS

Readme

expo-beacon

Expo native module for scanning, pairing, and monitoring iBeacon and Eddystone devices on Android and iOS, including background monitoring, notifications, event logging, and optional background-geolocation integration.

| Platform | Implementation | Support | | -------- | ---------------------------------- | ----------------------------- | | Android | AltBeacon and a foreground service | Scanning and monitoring | | iOS | Core Location and Core Bluetooth | Scanning and monitoring | | Web | Inert fallback | Native operations unsupported |

Important constraints

  • Native code is required. Expo Go is not supported.
  • Add the bundled config plugin before creating a development build.
  • iOS cannot perform wildcard iBeacon scans; provide a UUID or pair an iBeacon.
  • Pair at least one iBeacon or Eddystone-UID device before monitoring.
  • Eddystone scanning does not use an iBeacon UUID filter.

Install

npx expo install expo-beacon

Add the config plugin:

{
  "expo": {
    "plugins": ["expo-beacon"]
  }
}

Rebuild the native application after adding or changing the plugin:

npx expo prebuild
npx expo run:android
# or: npx expo run:ios

See Getting started for permission behavior and the complete installation path.

Scan for iBeacons

For new code, prefer the named helpers with self-describing options:

import { ExpoBeacon, scanForBeacons } from "expo-beacon";

const granted = await ExpoBeacon.requestPermissionsAsync();
if (!granted) {
  throw new Error("Beacon permissions were not granted");
}

const nearby = await scanForBeacons({
  uuids: ["E2C56DB5-DFFB-48D2-B060-D0F5A71096E0"],
  durationMs: 5_000,
});

The backwards-compatible default export still exposes the positional native API:

import ExpoBeacon from "expo-beacon";

const nearby = await ExpoBeacon.scanForBeaconsAsync(
  ["E2C56DB5-DFFB-48D2-B060-D0F5A71096E0"],
  5_000,
);

See Scanning for Eddystone, continuous scanning, result units, cancellation, and platform differences.

Monitor a paired beacon

import { ExpoBeacon, pairBeacon } from "expo-beacon";

pairBeacon({
  identifier: "lobby-door",
  uuid: "E2C56DB5-DFFB-48D2-B060-D0F5A71096E0",
  major: 1,
  minor: 100,
  timeoutSeconds: 30,
});

const entered = ExpoBeacon.addListener("onBeaconEnter", (event) => {
  console.log("entered", event.identifier, event.distance);
});

await ExpoBeacon.startMonitoring({
  maxDistance: 10,
  exitDistance: 12.5,
  level: "events",
});

// Later:
await ExpoBeacon.stopMonitoring();
entered.remove();

See Background monitoring for thresholds, timeouts, Eddystone pairing, notifications, and cleanup.

React hook

import { useBeacon } from "expo-beacon";

function NearbyBeaconCount() {
  const { inRange, isMonitoring, startMonitoring, stopMonitoring } =
    useBeacon();

  return null; // Render these values in your application UI.
}

The hook manages native event subscriptions, reactive paired-device state, and stable action wrappers.

Config-plugin types

The plugin option types are available through a typed package subpath:

import type { BeaconPluginProps } from "expo-beacon/plugin";

See Config plugin and Background geolocation.

Documentation

Contributing

Run the following checks before opening a pull request:

npm run build
npm test -- --runInBand
npm run test:types
npm run lint
npm run docs:api
npm pack --dry-run

Repository-specific guidance for coding agents and contributors is in AGENTS.md.

License

MIT