Skip to content

Sample app to scan qr codes, developed in React Native

Notifications You must be signed in to change notification settings

FabianShallari/qrcode_app

Repository files navigation

Qr Code Scanner

Description

This is a simple app made in React Native which scans some pre-made QR Codes and triggers a navigation event automatically to a new screen

Running the app (macOS)

Android

  1. First make sure that adb is in your path:

    Open your terminal and type:

    which adb

    if the result is something like:

    /usr/local/bin/adb

    then you are all set (skip to step 2), otherwise run the following command:

    brew cask install android-platform-tools

    run again to confirm adb is installed:

    which adb

    now it should show:

    /usr/local/bin/adb

  2. Run adb reverse tcp:8081 tcp:8081

  3. To avoid dependencies mismatch make sure you are using [email protected]:

     // using nvm
    
     nvm install 8.10.0
     nvm use 8.10.0
    
  4. Clone repository locally:

    git clone https://github.com/fabianshallari/qrcode_app /my_favorite_path/qrcode_app
    
  5. Install and link node_modules

    cd /my_favorite_path/qrcode_app
    yarn install
    react-native link react-native-camera 
    
  6. Import the project on Android Studio:

    File -> Open -> my_favorite_path -> qrcode_app -> android
    

    After this step Android Studio might prompt you to install required dependencies such as SDK, and platform tools.

    Follow all instructions from the prompt until Gradle builds the project successfully.

    This should have also generated your local.properties file with a link to the Android SDK in your system

  7. Open your favorite text editor and open the project

     // example with VsCode:
     code /my_favorite_path/qrcode_app
    
  8. Connect your Android device with the computer and Enable Remote USB Debugging

  9. Run the project:

    npm start
    react-native run-android
    
  10. Enjoy

    Try some cats:

    cat qr

    Try some dogs:

    dog qr

    Try an invalid QR code:

    invalid qr

About

Sample app to scan qr codes, developed in React Native

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published