react-native-contact-tracing

1.0.1 • Public • Published

react-native-contact-tracing

⚠️ I do not own the react-native-contact-tracing package on npm. My package will remain unpublished until the official frameworks are released. The current owner of react-native-contact-tracing has a boilerplate project published to it and is in no way related to this repository. Until I can contact the owner of the package or find a better name: do not install this package from the directions below, they are placeholders only.

A native module for Apple & Google's Contact Tracing Framework.

This work is based on mattt's theoretical ContactTracingManager, Apple's ContactTracing API Documentation & Google's Android API Docs.

Help welcome for Android! see issue #1

Getting started

$ npm install react-native-contact-tracing --save

Mostly automatic installation

$ react-native link react-native-contact-tracing

Usage

Example

import ContactTracing from 'react-native-contact-tracing';
 
contactTracing.start();

Methods

Summary


Details

start()

await contactTracing.start();

Begin contact tracing, asking for permissions if need be. This returns a promise that resolves if tracing began successfully.


stop()

await contactTracing.stop();

Stops contact tracing, this also returns a promise that resolves if tracing ended successfully.


requestExposureSummary()

const { matchedKeyCount, contactInformation } = await contactTracing.requestExposureSummary();

Provides a summary on exposures. This returns a promise that resolves to an object containing the matchedKeyCount & an array of CTContactInfo objects.


currentStatus()

const status = await contactTracing.currentStatus();

This returns a promise that resolves to the current tracing status. The value is an integer.


License

This project has no affiliation with Apple or Google.

Information subject to copyright. All rights reserved.

Dependencies (0)

    Dev Dependencies (2)

    Package Sidebar

    Install

    npm i react-native-contact-tracing

    Weekly Downloads

    0

    Version

    1.0.1

    License

    UNLICENSED

    Unpacked Size

    135 MB

    Total Files

    13203

    Last publish

    Collaborators

    • ericlewis