New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-nfc-suppress

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-nfc-suppress

suppress nfc

  • 0.1.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

react-native-nfc-suppress

Allow disabling of Google pay and Apple pay if needed.

Contributions are welcome!

Installation

npm install react-native-nfc-suppress
Android

Update AndroidManifest.xml

<uses-permission android:name="android.permission.NFC" />
iOS

This library use native-modules, so you will need to do pod install for iOS:

cd ios && pod install && cd ..

Usage

import React from 'react';

import {
  View,
  Text,
  Button,
} from 'react-native';

import { useNfcSuppressor } from 'react-native-nfc-suppress';

export const ExampleComponent= () => {
  const { suppressed, supported, enabled, enable, disable } = useNfcSuppressor();
  
  const switchSuppression = (): void => {
    if (suppressed) {
      disable();
    } else {
      enable();
    }
  };

  return (
    <View style={{display:'flex', flexDirection:'column'}}>
      <Text>{`Is NFC enabled: ${supported}`}</Text>
      <Text>{`Is NFC enabled: ${enabled}`}</Text>
      <Text>{`Is enabled: ${suppressed}`}</Text>
      <Button title="Switch" onPress={switchSuppression} />
    <View>	 
   )
}

Docs

Hooks
useNfcSupportedState

Return boolean value. Channel NFC support state. Value updates on state change.

useNfcEnabledState

Return boolean value. Channel NFC state. Value updates on state change.

useNfcSuppressionState

Return boolean value. Channel NFC suppresion state. Value updates on state change.

useNfcSuppressor

Return object. Expose all module functionality.

License

MIT

Keywords

FAQs

Package last updated on 03 Nov 2022

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