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 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-beacon-radar-px

v0.3.6

Published

Module to scan for iBeacons on iOS and Android, within React Native and Expo managed projects.

Downloads

266

Readme

react-native-beacon-radar

CURRENTLY IN PROGRESS.... RIGHT NOW ONLY SCANS FOR CERTAIN IBEACON

Package to scan for iBeacons on both Android and IOS. This module is fully compatible with Expo (Will not work with Expo Go, but will work with development build.)

Installation

npm install react-native-beacon-radar

OR

yarn add react-native-beacon-radar

Basic usage

import { DeviceEventEmitter } from 'react-native';
import { startScanning } from 'react-native-beacon-radar';

// ...

startScanning('YOUR UUID', {
  useForegroundService: true,
  useBackgroundScanning: true,
});

DeviceEventEmitter.addListener('onBeaconsDetected', (beacons) => {
  console.log('onBeaconsDetected', beacons);
});

Current API:

| Method | Description | |:----------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | requestWhenInUseAuthorization | This method should be called before anything else is called. It handles to request the use of beacons while the application is open. If the application is in the background, you will not get a signal from beacons. | | requestAlwaysAuthorization | This method should be called before anything else is called. It handles to request the use of beacons while the application is open or in the background. | | getAuthorizationStatus | This methods gets the current authorization status. | | startScanning | This method starts scanning for a certain beacon based on its UUID. | | startRadar (Android only) | This method starts scanning for all beacons in range. This is only available on Android. |

| Event | Description | |:----------------------|:--------------------------------------------------------------------------| | onBeaconsDetected | This event gets called when the beacon you are searching for is in range. |

Expo

This module will work with the Expo managed workflow. It will not however work with Expo Go, since it needs native features. You can use the development build of Expo to test this module. More about this can be found here. To use this module in expo managed add the following to your app.json:

"expo": {
  "ios": {
    "infoPlist": {
      "NSLocationWhenInUseUsageDescription": "We need your location to detect nearby beacons.",
      "NSLocationAlwaysUsageDescription": "We need your location to detect nearby beacons even when the app is in the background.",
      "NSLocationAlwaysAndWhenInUseUsageDescription": "We need your location to detect nearby beacons even when the app is in the background."
    }
  },
  "plugins": [
    "react-native-beacon-radar"
  ]
}

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library