Skip to content
This repository has been archived by the owner on Mar 1, 2022. It is now read-only.

Can't detect available scanners neither get data after scanning #26

Open
sebas0811buitrago opened this issue Nov 13, 2021 · 2 comments
Open

Comments

@sebas0811buitrago
Copy link

sebas0811buitrago commented Nov 13, 2021

First of all thanks for your library, It'll be really helpfull for me when I make it work.

I'm trying to build a qr scan app with your package and it can't get the available scanners neither retrieve any data when I press the scan button. This is what I did so far:

  1. First thing I did was to run your git hub repository and it worked as expected, it show the availables scanners and also if I press the button scanner it retrieves data as you can see here:

image

  1. Then I init a react native project from zero and installed your npm package but I get this, It doesn´t list the available scans and neither retrives data when I press the scan button but The scanner beam emits though , here is a screenshot of what I got:

image

  1. I read the issue Can't seem to recieve intent and changed this "PACKAGE_NAME": "com.rn066datawedge" but it didn't work.

These are the versions of my dependencies:

    "react": "17.0.2",
    "react-native": "0.66.3",
    "react-native-datawedge-intents": "^0.1.8",
    "react-native-elements": "^3.4.2"

This is a repository with my code: repository

Maybe Do I have to change something in my manifest or graddle? Do you have any insight here?

Thanks in advanced.

@sebas0811buitrago sebas0811buitrago changed the title Can't detect available Can't detect available scanners neither get data after scanning Nov 13, 2021
@sebas0811buitrago
Copy link
Author

Sorry I just realize that this line "PACKAGE_NAME": "com.rn066datawedge" had to have the name of my package, I changed and it worked, now it retrieves the scanned data, however it doesn´t get the available scanners but I don´t know why.

@darryncampbell
Copy link
Owner

Hi, so to retrieve responses back from the DataWedge API (which is how the available scanners are delivered), you will need both the correct action, RESULT_ACTION, the same as https://github.com/darryncampbell/DataWedgeReactNative/blob/master/App.js#L100 and also you need to specify the default category, https://github.com/darryncampbell/DataWedgeReactNative/blob/master/App.js#L103. After registering your receiver, calling enumerate (https://github.com/darryncampbell/DataWedgeReactNative/blob/master/App.js#L163) should result in the scanners being returned as https://github.com/darryncampbell/DataWedgeReactNative/blob/master/App.js#L135. Please check that you have all of those in your application.

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

No branches or pull requests

2 participants