Skip to content

feat(tapcard): add NFC permission and card reading functionality#100

Open
manideepk90 wants to merge 2 commits into
mainfrom
feat/nfc-integration
Open

feat(tapcard): add NFC permission and card reading functionality#100
manideepk90 wants to merge 2 commits into
mainfrom
feat/nfc-integration

Conversation

@manideepk90

Copy link
Copy Markdown
Contributor

This pull request introduces a new TapCard (NFC card reading) SDK module to the project, integrates it into the build, and conditionally exposes its functionality to the React Native bridge if the device supports NFC and the TapCard SDK is available. The changes are grouped into TapCard SDK implementation, build system integration, and React Native bridge updates.

TapCard SDK Implementation:

  • Added a new module hyperswitch-sdk-android-tapcard with a public API (TapCard) for NFC card reading, including permission checks, lifecycle management, and card reading callbacks. The SDK is designed for merchant integration and includes robust error handling and timeouts.
  • Added Android manifest entries to request NFC permissions and declare the NFC hardware feature as optional, enabling graceful degradation on devices without NFC.
  • Added build configuration files (build.gradle, proguard-rules.pro, .gitignore) for the new TapCard SDK module. [1] [2] [3]

Build System Integration:

  • Registered the new TapCard SDK module as a project dependency in the demo app and added its version to gradle.properties. [1] [2]

React Native Bridge Updates:

  • Updated the HyperPackage React Native package to conditionally expose the new TapCardModule to JavaScript only if the TapCard SDK and NFC are available at runtime, ensuring backward compatibility and preventing runtime errors on unsupported devices.- Introduced TapCardResults.kt to handle NFC permission results and card reading outcomes with sealed classes and enums for error handling.
  • Implemented TlvParser.kt for parsing TLV (Tag-Length-Value) data structures, including methods for finding tags and parsing Track 2 data.
  • Added a transparent theme in themes.xml for the card scanning interface.
  • Updated settings.gradle to include the new hyperswitch-sdk-android-tapcard module.

@manideepk90 manideepk90 force-pushed the feat/nfc-integration branch from 2d68b06 to d304b41 Compare April 16, 2026 20:00
@sh-iv-am sh-iv-am force-pushed the main branch 4 times, most recently from 659def4 to 745466c Compare April 27, 2026 14:23
- Introduced `TapCardResults.kt` to handle NFC permission results and card reading outcomes with sealed classes and enums for error handling.
- Implemented `TlvParser.kt` for parsing TLV (Tag-Length-Value) data structures, including methods for finding tags and parsing Track 2 data.
- Added a transparent theme in `themes.xml` for the card scanning interface.
- Updated `settings.gradle` to include the new `hyperswitch-sdk-android-tapcard` module.
@manideepk90 manideepk90 force-pushed the feat/nfc-integration branch from d304b41 to b32ff3c Compare April 28, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant