existenz
existenz

Reputation: 21

QRCode Scanner in Android Studio

  1. I want to make QRCode Scanner Application in Android Studio. I found many solutions about this, but all of them open another app (like zxing). I want to make own layout and camera preview be in my layout. So I don't want to see another layout in my app (like zxing capture.xml)

  2. I imported project zxing to my Android Studio Project. But I always get this error

    com.zxing.... does not exist

Can anybody help me?

EDİT...

The list of what I did..
1 - open a new android studio project
2 - open module settings
3 - import module and locate zxing-2.0 dir.
4 - add the dependencies (:zxing20 and core.jar)
5 - :app module Compile SDK Version 19, BuildTools Versin 19.1.0, minsdk 8, target sdk 19
6 - :zxing20 module Compile SDK Version 10, BuildTools Versin 19.1.0, minsdk 7, target sdk 7

errors:
Error:(7, 39) error: package com.google.zxing.client.android does not exist
Error:(9, 33) error: cannot find symbol class CaptureActivity
Error:(11, 5) error: method does not override or implement a method from a supertype
Error:(13, 9) error: cannot find symbol variable super
Error:(14, 9) error: cannot find symbol method setContentView(int)

Upvotes: 2

Views: 9269

Answers (1)

Faisal
Faisal

Reputation: 364

We have to copy some codes from Android.manifest file from zxing sources. We need to copy Capture Activity and Encode activity declarations, uses permissions and uses features. Copy them and paste into your app manifest.

Scanning and generating barcodes using ZXING library on Android

Upvotes: 2

Related Questions