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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@mistsys/react-native-mistsdk

v0.1.5

Published

Mist Indoor Location sdk package

Downloads

22

Readme

React Native Mist SDK

iOS and Android wrapper for Mist Location SDK iOS and Mist Location SDK Android

Requirements

  1. Minimum Android SDK: API 26.
  2. iOS deployment Target: 14.0 or later.
  3. Access to the Mist Account
  4. Mobile SDK secret

Installation

  1. To install the package, inside your project directory, run:
    $npm install @mistsys/react-native-mistsdk
  2. For android User need to ask Bluetooth and location permissions from the react-native app side.
  3. For iOS follow the below steps:
  4. To provide bluetooth and motion sensor permission, add NSBluetoothAlwaysUsageDescription and NSMotionUsageDescription key with a string value in the info.plist file inside the ios folder.
    <key>NSBluetoothAlwaysUsageDescription</key>
    <String> Mist wants to access the Bluetooth in background </String>
    <key>NSMotionUsageDescription</key>
    <String> Motion sensor data is used to provide a more accurate indoor location estimate. </String>
  5. For Setup Podfile inside ios folder according to react native documentation, so the Podfile will look like this:
    target 'YourTargetName' do
    ....
    ....
        pod 'react-native-mistsdk', path: '../node_modules/@mistsys/react-native-mistsdk'   # add this line
    end
  6. Change the directory to your ios folder and run the below command.
    $pod install

Integration Guide

  1. Import the libraries from react-native.

    TypeScript:

    import {NativeEventEmitter, NativeModules} from 'react-native';
  2. Create an object for NativeModules to access the Mist SDK callbacks.

    TypeScript:

    const MistSDK = NativeModules.RNMistsdk ;
    const MistSDKEvents = new NativeEventEmitter(MistSDK);
  3. Start the Mist SDK with the Mobile SDK token.

    TypeScript:

    MistSDK.startWithToken(MIST_SDK_TOKEN);
  4. Once we have taken all the above steps, we will be able to get all the required information in the respective callbacks.

onMapUpdate

It will be called once the map gets updated – which means that, if the device moves from one floor to another floor, there will be a change in the floor map. In such a scenario this callback will be triggered with an updated floor map.

| Attribute | Datatype | Description | | ------------- | -----------|-------------------------------------------------| | mapId | String |Unique identifier of the map. | | name | String |It is the name of the map (Floor plan) | | ppm | double |The number of pixels per meter. | | url | String |This is the url which contains the actual map. |

TypeScript:

MistSDKEvents.addListener('onMapUpdate', (map) => {
      console.log(map);
});

onRelativeLocationUpdate

The main purpose of this method is to provide a relativeLocation, which provides detailed information about the current location of the device.

| Attribute | Datatype | Description | | ------------- | -----------|-------------------------------------------------| | mapId | String |It provides id of the MistMap. | | x | double |It is a spatial coordinate x (in px). | | y | double |It is a spatial coordinate y (in px). | | lat | double | It mentions the current latitude of the device. | | lan | double | It mentions the current longitude of the device.|

TypeScript:

MistSDKEvents.addListener('onRelativeLocationUpdate', (relativeLocation) => {
      console.log(relativeLocation);
});

onRecievedAllMaps

This method will give us maps for all sites in the entire organization. It gives us the array of maps which is supposed to be of MistMap type. (Properties were explained in detail onMapUpdate method explanation).

TypeScript:

MistSDKEvents.addListener('onReceivedAllMaps', (maps) => {
      console.log(maps);
});

onEnterZone

This method will be triggered when the app enters our monitoring region (the area we marked as a zone in our MistMap).

| Attribute | Datatype | Description | | ------------- | -----------|---------------------------------------------------| | zoneId | String |Unique identifier of the zone. | | name | String |Name of the zone. | | mapId | String |The map ID associated with the zone event. | | userId | String |The user ID associated with the zone event. | | orgId | String |The organisation ID associated with the zone event.| | siteId | String |The site ID associated with the zone event. | | recipient | String |The recipient of the zone event. | | type | String |The trigger associated with the zone event. |

TypeScript:

MistSDKEvents.addListener('onEnterZone', (zone) => {
      console.log(zone);
});

onExitZone

This method will be triggered when the app exits our monitoring region (the area we marked as a zone in our MistMap).

| Attribute | Datatype | Description | | ------------- | -----------|---------------------------------------------------| | zoneId | String |Unique identifier of the zone. | | name | String |Name of the zone. | | mapId | String |The map ID associated with the zone event. | | userId | String |The user ID associated with the zone event. | | orgId | String |The organisation ID associated with the zone event.| | siteId | String |The site ID associated with the zone event. | | recipient | String |The recipient of the zone event. | | type | String |The trigger associated with the zone event. |

TypeScript:

MistSDKEvents.addListener('onExitZone', (zone) => {
      console.log(zone);
});

onRangeVirtualBeacon

Using this method, we can get the current ranging beacon, which is near to us.

| Attribute | Datatype | Description | | ------------- | -----------|-------------------------------------------------------| | name | String |Name of the Virtual Beacon. | | orgId | String |Organization identifier. | | siteId | String |Site Id. | | vbId | String |Unique Identifier of the Virtual beacon on Mist portal.| | vbUUId | String |UUID of the Virtual Beacon. | | message | String |Message associated with the virtual beacon. |

TypeScript:

MistSDKEvents.addListener('onRangeVirtualBeacon', (virtualBeacon) => {
      console.log(virtualBeacon);
});

onUpdateVirtualBeaconList

It will return all the available virtual beacons placed on the floorplan whenever its position and other details are changed from the Mist portal. (Properties were explained in detail onRangeVirtualBeacon method explanation).

TypeScript:

MistSDKEvents.addListener('onUpdateVirtualBeaconList', (virtualBeacons) => {
      console.log(virtualBeacons);
});

Note: This plugin is not supported for Expo projects.