Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fat-jaguar-sdk

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fat-jaguar-sdk

fat-jaguar-sdk React Native SDK; integrates the Android and iOS Point SDK libraries

  • 1.0.11
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

fat-jaguar-sdk

Getting started

$ npm install fat-jaguar-sdk --save

Mostly automatic installation

$ react-native link fat-jaguar-sdk

For iOS

  1. Install Pods
$ cd ios
$ pod install
  1. Setup your .plist file as laid out on this

For Android

  1. Include Jitpack in your Maven dependencies in build.gradle
allprojects {
    repositories {
        ...

         // ADD IT HERE
        maven { 
            url "https://jitpack.io" 
        }
    }
}
  1. Make sure Jetify is available in your development environment

$ npx jetify

Usage

import FatJaguarSdk from 'fat-jaguar-sdk';

componentDidMount = async () => {
    
    // ...

    const channelId = 'fat-jaguar-sdk React Native'
    const channelName = 'fat-jaguar-sdk React Native'
    const title = 'fat-jaguar-sdk Foreground Service'
    const content = "This app is running a foreground service using location services"

    // Foreground Service for Android to improve trigger rate - iOS will ignore this.
    FatJaguarSdk.setForegroundNotification(channelId, channelName, title, content, true)

    // If you would like to add custom event meta data
    FatJaguarSdk.setCustomEventMetaData({ userId: 'user_id_goes_here' })

    FatJaguarSdk.authenticate('your_application_project_id', '<Always|WhileInUse>', () => console.log("On success"), () => console.log("On fail"))

    FatJaguarSdk.on('zoneInfoUpdate', (event) => {
      // ...
    })

    FatJaguarSdk.on('checkedIntoFence', (event) => {
      // ...
    })

    FatJaguarSdk.on('checkedOutFromFence', (event) => {
      // ...
    })

    FatJaguarSdk.on('checkedIntoBeacon', (event) => {
      // ...
    })

    FatJaguarSdk.on('checkedOutFromBeacon', (event) => {
      // ...
    })

    FatJaguarSdk.on('startRequiringUserInterventionForBluetooth', (event) => {
      // ...
    })

    FatJaguarSdk.on('stopRequiringUserInterventionForBluetooth', (event) => {
      // ...
    })

    FatJaguarSdk.on('startRequiringUserInterventionForLocationServices', (event) => {
      // ...
    })

    FatJaguarSdk.on('stopRequiringUserInterventionForLocationServices', (event) => {
      // ...
    })
  }

Events

zoneInfoUpdate
{
    "zoneInfos": [
        {
            "ID": "zone-UUID-here",
            "name": "Your zone name here"
        }
        //...
    ]
}
checkedIntoFence
{
    "zoneInfo": {
        "ID": "zone-UUID-here",
        "name": "Your zone name here"
    },
    "fenceInfo": {
        "ID": "fence-UUID-here",
        "name": "Your fence name here"
    },
    "locationInfo": {
        "unixDate": "Timestamp of triggering location update",
        "latitude": "Latitude of triggering location update",
        "longitude": "Longitude of triggering location update",
        "bearing": "Bearing of triggering location update (if available)",
        "speed": "speed of triggering location update (if available)",
    },
    "customData": {
        "custom-field-name": "Custom zone data field value"
    },
    "willCheckout": false // True if the zone has checkout enabled.
}
checkedOutFromFence
{
    "zoneInfo": {
        "ID": "zone-UUID-here",
        "name": "Your zone name here"
    },
    "fenceInfo": {
        "ID": "fence-UUID-here",
        "name": "Your fence name here"
    },
    "customData": {
        "custom-field-name": "Custom zone data field value"
    },
    "dwellTime": 5 // Number of minutes the device dwelled in the zone
}
checkedIntoBeacon
{
    "zoneInfo": {
        "ID": "zone-UUID-here",
        "name": "Your zone name here"
    },
    "beaconInfo": {
        "ID": "zone-UUID-here",
        "name": "Your zone name here",
        "macAddress": "AA:BB:CC:DD:EE:FF", // Mac address here
        "proximityUuid": "beacon-UUID-here",
        "major": 1, // As set on backend
        "minor": 2, // As set on backend
        "latitude": "Latitude of beacon",
        "longitude": "Longitude of beacon",
    },
    "locationInfo": {
        "unixDate": "Timestamp of triggering location update",
        "latitude": "Latitude of triggering location update",
        "longitude": "Longitude of triggering location update",
        "bearing": "Bearing of triggering location update (if available)",
        "speed": "speed of triggering location update (if available)",
    },
    "customData": {
        "custom-field-name": "Custom zone data field value"
    },
    "willCheckout": false // True if the zone has checkout enabled.
}
checkedOutFromBeacon
{
    "zoneInfo": {
        "ID": "zone-UUID-here",
        "name": "Your zone name here"
    },
    "beaconInfo": {
        "ID": "zone-UUID-here",
        "name": "Your zone name here",
        "macAddress": "AA:BB:CC:DD:EE:FF", // Mac address here
        "proximityUuid": "beacon-UUID-here",
        "major": 1, // As set on backend
        "minor": 2, // As set on backend
        "latitude": "Latitude of beacon",
        "longitude": "Longitude of beacon",
    },
    "locationInfo": {
        "unixDate": "Timestamp of triggering location update",
        "latitude": "Latitude of triggering location update",
        "longitude": "Longitude of triggering location update",
        "bearing": "Bearing of triggering location update (if available)",
        "speed": "speed of triggering location update (if available)",
    },
    "customData": {
        "custom-field-name": "Custom zone data field value"
    },
    "dwellTime": 5 // Number of minutes the device dwelled in the zone
}
startRequiringUserInterventionForBluetooth
{}
stopRequiringUserInterventionForBluetooth
{}
startRequiringUserInterventionForLocationServices
{
    "authorizationStatus": "denied" // Or: restricted, notDetermined, always, whenInUse, unknown
}
stopRequiringUserInterventionForLocationServices
{
    "authorizationStatus": "denied" // Or: restricted, notDetermined, always, whenInUse, unknown
}

Keywords

FAQs

Package last updated on 02 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc