Skip to content
New issue

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

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

Already on GitHub? # to your account

feat: qr code generation and display #118

Merged
merged 14 commits into from
Apr 25, 2024
Merged

Conversation

GaelCondeLosada
Copy link
Collaborator

@GaelCondeLosada GaelCondeLosada commented Apr 23, 2024

What I did

  • I implemented the MyQrScreen that generate a qr code for each user that others can use to add them as contact.
  • I created an empty AddContactScreen and used deep linking so that we are redirected to this screen in the app when scanning a specific qr code.
  • The uid of the user is also passed as property when scanning the qr code.

How I did it

  • Added dependency : react-native-qrcode-svg to generate qr codes.
  • Added dependency: expo-linking for the app to use deep linking.
  • Implemented qr code generation into MyQrScreen.
  • Created file AddContactScreen and added it to the navigator.
  • Setup the deep linking into App.tsx (only to add contacts for now). Note that I had to invert the NavigationContainer and the SafeAreaProvider order to make it work.
  • Added and adapted tests for all new files and new functionalities.

How to verify it

  • You can go to my profile and then QR to see the screen.
  • You can then get the QR code and scan it with your phone to see if it redirects you to the right screen in the app.
  • You can also run the tests.

Demo video

WhatsApp.Video.2024-04-25.at.00.41.21_603844e9.mp4

Pre-merge checklist

The changes I have introduced:

  • work correctly
  • do not break other functionalities
  • work correctly on Android
  • are fully tested

@GaelCondeLosada GaelCondeLosada linked an issue Apr 23, 2024 that may be closed by this pull request
@GaelCondeLosada GaelCondeLosada changed the title Qr code generation feat: qr code generation and display Apr 23, 2024
Copy link

@GaelCondeLosada GaelCondeLosada marked this pull request as ready for review April 24, 2024 22:53
Copy link
Collaborator

@alexandre-mrt alexandre-mrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@GaelCondeLosada GaelCondeLosada merged commit 3cf38e3 into main Apr 25, 2024
3 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generate QR for events and profile
2 participants