For my current project I need to integratie QR code scanning in my app (which will be available for both Android and iOS). The QR code contains info that sets up the app for the rest of use case. For Android I'm looking into the ZXing project. There are two possibilities: Either integrate a library such as ZXing, or call it from my own app with an intent. I'm wondering which of the two is preferable from the UX point of view.

Scan via an intent

  • Pro:

    • Follows the Unix philosophy of "Write programs that do one thing and do it well. Write programs to work together." Google Authenticator does it for example, and the fact the OS has support built in for this kind of thing leads me to believe it's a good practice.
  • Con:

    • Users without the app need to download and install the Barcode Scanner app from ZXing before they can continue to complete the task they originally set out to do.

Integrate library

  • Pro:

    • Easier for less experienced Android users.
  • Con:

    • Larger app file size.

Integrating the library might take more developer effort and seemingly goes against Android best practices, but in the end it seems to be the most user friendly option. Should I integrate ZXing?

  • Is the term "intents" something Android specific or do I just not get it? What does it mean?
    – kontur
    Feb 4, 2013 at 13:03
  • On a sidenote, WP8 also has the QR scanner built-in - I don't understand why some smartphones don't come shipped with one, but maybe that is a thing from the past and the trend goes more to having those integrated no matter which OS.
    – kontur
    Feb 4, 2013 at 13:05
  • 1
    @kontur yes, Intents are Android specific. I know something similar is called Contracts for Windows 8 apps, not sure if that's also the case for Windows Phone.
    – Rafe
    Feb 4, 2013 at 14:03
  • From a pure UX perspective, I'd imagine that removing the need for the user to install the separate app would provide a better experience. However, if any issues appear (such as in future releases of the Android OS), you're making yourself responsible for maintaining all of that complex code that you're more than likely very unfamiliar with. IMO, the UX may be better, but with the slight risk of potential issues in the future. (The ZXing team also prefers that you use Intents, but that's neither here nor there.)
    – Cloudy
    Feb 4, 2013 at 15:52

2 Answers 2


Does your project have competitors? If no, you should choose variant for fastest possible delivery of your product to market. First users of your product will be so called 'innovators' and they will use it regardless of your implementation of QR scanner. But if yes, you need to analyze market - competitors' functionality and customers' expectations. Of course you are to make your product at least at the same level of comfort for your customers.

In general from technical point of view integration seems to be more reliable in sense of predictability of your software behavior at customer's platform - you can control everything you need.


After some more Googling today I found these comments on a blog from ZXing co-creator Sean Owen. He advises against just copy-pasting the source code in your own app, and recommends using intents if you're looking for that kind of quick integration. He does not speak out against valid reasons for source code integration, like the example in the blog itself (in-house enterprise app on devices without access to the Play Store) or heavily customized scanning apps.

As time to market is more important for us, Serg is right and we'll settle on intents for now. In the aforementioned comments there's another project linked called android-quick-response, which is an adaptation of ZXing specifically meant for source code integration in other apps - something to look at in a few months :)

Regarding kontur's side note on OS integration, Owen writes ZXing was developed at Google and was almost a part of Android 1.0.


Not the answer you're looking for? Browse other questions tagged or ask your own question.