I’m making an app for a new federated messaging protocol, Sufec, which needs to be able to link a device by scanning a QR code, for multi-device support. I can’t for the life of me find a way to do this anywhere on the internet. I want a solution that:

  • Doesn’t depend on the image already being scanned and saved (ie. it should open a camera app, not a files app)
  • QR code should be detected by the camera app, so the user doesn’t have to snap a picture, then return to the messaging app and see an error that the QR code couldn’t be read
  • Doesn’t depend on having any specific app installed
  • Is not deprecated
  • @Yujiri@lemmy.mlOP
    link
    fedilink
    12 years ago

    I can’t figure out how to import zxing. Their docs refer to files with package com.google.zxing.integration.android, but I get errors saying that isn’t found.

    Also, this article suggests that that library requires a specific app to be installed from google play. Surely there’s a way to do this without relying on that? There must be something built-in.

    • m-p{3}
      link
      fedilink
      02 years ago

      Maybe you can look at how Binary Eye integrates the library and base your work upon it?

      • @Yujiri@lemmy.mlOP
        link
        fedilink
        02 years ago

        Binary Eye is a scanning app. I’m not trying to make a scanning app, I’m trying to call out to one. What I’d hoped is that Android has some way to call out to “whatever the user has set as default barcode scanning app”, but maybe there just isn’t such an interface.

        I would look at just embedding the scanning functionality into my app itself, but Binary Eye is massive! And there are dependencies on other third-party camera libraries in there, so that’s not even all of it.

        • m-p{3}
          link
          fedilink
          12 years ago

          It’s is a scanning app, but its core relies on the zxing library. Sadly there isn’t a standardized way of calling a default barcode scanning app on Android, so your only option is to build your own inside the app, or rely in the zxing library.

            • @Yujiri@lemmy.mlOP
              link
              fedilink
              12 years ago

              Hey @mp3, thought I should come back and give you an update! I finally managed to do as you said with the zxing library and get it to work! In just a minute, I’ll be able to commit this feature :)