Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NFC Scan Sounds #60

Closed
dspencer926 opened this issue Jun 11, 2018 · 6 comments
Closed

NFC Scan Sounds #60

dspencer926 opened this issue Jun 11, 2018 · 6 comments

Comments

@dspencer926
Copy link

Hi, I'm trying to disable the native scan sound so that I can use my own instead. Is there any way to use the enableReaderMode API instead of enableForegroundDispatch so that I can use the FLAG_READER_NO_PLATFORM_SOUNDS flag?

@whitedogg13
Copy link
Member

Hi, currently we haven't bridged the enableReaderMode API. Welcome to submit a PR!

@whitedogg13
Copy link
Member

@dspencer926 Hi, with the latest 1.2.0 release, now we can pass this flag with registerTagEvent to disable the sound!

@JohnTheo13
Copy link

Which flag is this cause it's not mentioned in the documentation

@rahamin1
Copy link

rahamin1 commented Jun 30, 2020

Looking at the code, it seems that the flag is FLAG_READER_NO_PLATFORM_SOUNDS: https://bit.ly/3e1heXV,
but how do I pass it to registerTagEvent?

I thought that I should write:

NfcManager.registerTagEvent({alertMessage: 'my message', readerModeFlags: NfcAdapter.FLAG_READER_NO_PLATFORM_SOUNDS});

but it doesn't work...

Since this issue is closed, i will open a new one.

--
key: audio

@pilattebe
Copy link

pilattebe commented Sep 2, 2020

@rahamin1, I see that you haven't opened a new issue. Could you share your solution if you've solved it ?

For future reference, I will link this part of the documentation. Not because it's related to the current issue, but because it shows the correct syntax for adding and composing tags.

It seems the documentation example is not working either.

@rahamin1
Copy link

rahamin1 commented Sep 2, 2020

I didn't solve it.

You can see some more info about this in https://stackoverflow.com/questions/62849096/disable-sound-in-react-native-nfc-manager-v2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants