Giter Club home page Giter Club logo

react-native-contact-tracing's Introduction

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.

react-native-contact-tracing's People

Contributors

ericlewis avatar alloy avatar krizzu avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.