Hello Android
Guys,
Have you
facing issue in Integrating QR Code scanner ?
Please follow
this steps:
Run this command from your terminal(for
mac/linux os)
svn
checkout http://zxing.googlecode.com/svn/trunk/
zxing-read- only
zxing-read- only
Also you can
find the full source code at this url
Step 2 : Build
zxing core using Apache Ant
You will need to
build the core project into a jar file using apache
ant
(download from here
http://ant.apache.org/ivy/download.cgi).
Using a shell or cmd prompt navigate to the root directory of
the downloaded zxing src and execute “ant -f core/build.xml”.
This will produce a file core/core.jar which
Using a shell or cmd prompt navigate to the root directory of
the downloaded zxing src and execute “ant -f core/build.xml”.
This will produce a file core/core.jar which
Step 3: Build
ZXing Android using Eclipse
Create a New Android
Project (File –> New –> Android Project).
Set the project name
to ZXing (or similar).
Select the “Create
project from existing source” radio button
Click “Browse” and
navigate to the android project that you downloaded
from
zxing and click
“OK” Select “Finish”
The project will not
currently build. We need to add the core.jar file (that
we
produced
in the previous step) into our project.
Right-click on ZXing
project –>
properties –> Java Build Path –> Add External Jars
–> Navigate to
and select core.jar
–> Open –> OK.
Actually, while we’re
here we should do one more very important thing!
Right-click on ZXing
project –> properties –> Android –> Scroll down
and
check/tick the “Is
Library” checkbox –> OK
Step 4:
Include ZXing Android into your project.
Within
Eclipse, Right-click on YOURPROJECTNAMEHERE project
–>
properties
–>Android –> Scroll down to Libraries section –>
Click Add –>
Select ZXing
(which should appear as an option as a result of
completing
previous
step).
Here ,I am sharing you a
full running Sample code . Just download it,
import
it into your Eclipse and
Run.
1. AndroidManifest.xml
1. AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.testqrcode" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" /> <uses-permission android:name="android.permission.CAMERA" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity android:name=".TestQRCodeActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name="com.google.zxing.client.android.CaptureActivity" android:configChanges="orientation|keyboardHidden" android:screenOrientation="landscape" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:windowSoftInputMode="stateAlwaysHidden" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> <intent-filter> <action android:name="com.google.zxing.client.android.SCAN" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity> </application> </manifest>
2. TestQRCodeActivity.java
package com.testqrcode; import com.google.zxing.client.android.CaptureActivity; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.Toast; public class TestQRCodeActivity extends Activity { /** Called when the activity is first created. */ Button b1; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); b1 = (Button) findViewById(R.id.submit); b1.setOnClickListener(new OnClickListener() { public void onClick(View arg0) { // TODO Auto-generated method stub Intent intent = new Intent(TestQRCodeActivity.this, CaptureActivity.class); // Intent intent = new // Intent("com.google.zxing.client.android.SCAN"); intent.putExtra("SCAN_MODE", "QR_CODE_MODE"); startActivityForResult(intent, 0); } }); } public void onActivityResult(int requestCode, int resultCode, Intent intent) { if (requestCode == 0) { if (resultCode == 1) { // Handle successful scan String capturedQrValue = intent.getStringExtra("RESULT"); // String format = intent.getStringExtra("SCAN_RESULT_FORMAT"); Toast.makeText(TestQRCodeActivity.this, "Scan Result:" + capturedQrValue, Toast.LENGTH_SHORT) .show(); } else if (resultCode == RESULT_CANCELED) { // Handle cancel } } else { } } }I am also sharing the screen shot which helps you in configuring the build path and zxing as a library project.
May this will Helps you.
Enjoy
Coding…. J
Cheers…. J
Thnx!! Mukesh for providing the code.
ReplyDeleteI am trying to integrate this and your blog help a lot.
Thnx and welcome.....
ReplyDeleteplease feel free to ask regarding its integration if you are facing any issue at your end...
pls share layout view of the about code
ReplyDelete@Muthu:
ReplyDeleteIn my blog i am sharing the ful running code, pls go through the downloaded link.
Hi Mukesh,
DeleteI dont seem to find the code. Please could you give a link. Thanks.
Hi Mukesh,
DeleteI dont seem to find the source on your blog. Please help with link.
I am new to android and needing help with QR. Thank you.
Cheers
Francis
Hi,
ReplyDeleteHave you knowledge about geo fence concepts in google map in android.if yes means please share your knowledge..
yeah i tried in same last project that time my client was saying astonish condition to using Zxing lib, there is any way feel like own app..
ReplyDeleteThanks
Thanks Imran,
ReplyDeleteYes there is a way..I will help you more if you share your code or view.
Hi Mukesh Yadav,
ReplyDeleteFirst of all thank you for an updated tutorial about ZXing library.
I downloaded your code, create the file code.jar and add it to the 2 packages I downloaded from you. I changed the Java Compiler to 1.6 to remove all the errors. I created the apk file, installed it and when I submited there is a error and appearded a forced close. Do you know the reason?
I would like to embedded the ZXing library in my app and I think that it´s done by adding the generated core.jar file
Hey Ivan,
ReplyDeleteI am also face this issue when ,I am trying to embedded the zxing library.
In my case , I am getting class not found error.
This , happen because , I missed to add core.jar into build path.But after adding it reference into my build path ,Its worked.
I don't know whats wrong in your case , but if you share your error detail i.e log cat detail , then probably o will solved your problem.
Hey Mukesh,
ReplyDeleteI saved code.jar into libs folder from com.google.zxing.client.android.PreferencesActivity and then add it into the build path, create the apk file and it work now!!
Thank you very much.
Now I would like to use the String capturedQrValue to do a query to a database (the String is a query to a database), I don´t know if I have to do an intent in the if in onActivityResult method from testQRCodeActivity to call to the new classes
Thanks a lot Mukesh
Hi Ivan,
ReplyDeleteIf, I am right ,you need to open a new activity
on the basis of "String capturedQrValue" ??
If yes, In my code, I am already fetching the "String capturedQrValue" , in onActivityResult.
You just put new intent to open new class inside the onActivityResult.Just after where ,I am fetching the "String capturedQrValue" from intent.
Feel, free to ask ,If I am wrong.
Yuo are right again Mukesh
ReplyDeleteI did as you said and it works perfectly
Thanks a lot
Thanks and welcome, Ivan
ReplyDeletei have imported your project into eclipse gives no errors but when i run and click on submit button the application stops unexpectedly so can u suggest something..
ReplyDeleteHello Jayant,
ReplyDeleteWill you provide me the log cat error which occurs in your case.
I thinks you are facing the class not found error and your app is going to be force closed....Right ??
If this is the error please read the conversation B/W me and Ivan.
Why do you need a function onActivityResult(int requestCode, int resultCode, Intent intent), I ran the your application and it does not show the message from function onActivityResult function such as Toast.makeText (MainActivity.this,
ReplyDelete"Scan Result:" + capturedQrValue, Toast.LENGTH_SHORT).show ()
???
Do you know where the source code is located in the CaptureActivity message that displays the results of the scan. Because that would set the TextView results in TestQRCodeActivity?
FYI,
ReplyDeleteIf you scan a valid qr code then the scan result will be handle inside the onActivityResult(int requestCode, int resultCode, Intent intent).
The toast display the qr code value.
Inside the lib project there is class "CaptureActivity" In which I am putting the value in bundle.
Please could you make a video for your project because i'm working on windows and can't fix some problem, please help
ReplyDeleteSure, soon I will upload an video tutorial link of Qr code integration.
ReplyDeleteIn B/w if you have query|problem regarding the integration of above code please let me konow...what it is ??
can you send this project on email please i need help
ReplyDeleteEMail :hussainadse@gmail.com
Hello Hussain,
ReplyDeleteWith this blog I already provided the full working source code , you just need to download it and import it in your IDE.
Mukesh,
ReplyDeleteThe link to the source code is not working anymore, can you upload it anywhere or send it to me rvardasca@gmail.com
Hi Mukesh,
ReplyDeleteI have been searching internet for zxing integration into an existing android application but I could not find a complete tutorial upto yours. I really appreciate your work, with one word it is fabulous!
I tried to download the code but the zip file does not exist. Could you check it please.
Same as above!
ReplyDeleteThe file is not there apparently, would be a massive help if you could resolve this :)!
Thank you in advance ;)!
Hi Mukesh i am not able to download your application but i follow the step that u have told on this blog but i notice that i Zxing folder there are multiple directory, i already found the core.jar in Zxing/core foolder and implement it bbut i found ClassNotFoundExceeprion pls suggest me where i am wrong...
ReplyDeleteHello Haris, In your case I think you are not adding the core.jar library in your application build path... So Its giving you ClassNotFoundExceprion .
ReplyDeletei already added it but still getting the same error
ReplyDeleteClean your project and try it. I am doing the same and Its working at my end.
ReplyDeleteHave you added the core.jar as a library in the zxing project?
Hello Mukesh,
ReplyDeleteWhen i am executing this commanf in order to get core.jar
c:\ZXing-2.1\zxing-2.1\android\src>ant -f core/build.xml
i am getting build.xml does not exist
please suggest me when i am wrong i am very thanskfull to you
Mukesh Now i am able to resolve ClassNotFounfException but application creahes with the following log
ReplyDelete02-12 16:13:09.739: W/ActivityThread(28307): Application com.example.testingqrproject is waiting for the debugger on port 8100...
02-12 16:13:09.739: I/System.out(28307): Sending WAIT chunk
02-12 16:13:09.949: I/System.out(28307): Debugger has connected
02-12 16:13:09.949: I/System.out(28307): waiting for debugger to settle...
02-12 16:13:10.159: I/System.out(28307): waiting for debugger to settle...
02-12 16:13:10.359: I/System.out(28307): waiting for debugger to settle...
02-12 16:13:10.549: I/System.out(28307): waiting for debugger to settle...
02-12 16:13:10.759: I/System.out(28307): waiting for debugger to settle...
02-12 16:13:10.959: I/System.out(28307): waiting for debugger to settle...
02-12 16:13:11.159: I/System.out(28307): debugger has settled (1314)
02-12 16:13:11.439: I/PlatformSupportManager(28307): Using default implementation class com.google.zxing.client.android.common.executor.DefaultAsyncTaskExecInterface of interface com.google.zxing.client.android.common.executor.AsyncTaskExecInterface
02-12 16:13:11.519: W/CaptureActivity(28307): android.content.pm.PackageManager$NameNotFoundException: com.google.zxing.client.android
02-12 16:13:11.519: W/CaptureActivity(28307): at android.app.ContextImpl$ApplicationPackageManager.getPackageInfo(ContextImpl.java:1725)
02-12 16:13:11.519: W/CaptureActivity(28307): at com.google.zxing.client.android.CaptureActivity.showHelpOnFirstLaunch(CaptureActivity.java:676)
02-12 16:13:11.519: W/CaptureActivity(28307): at com.google.zxing.client.android.CaptureActivity.onCreate(CaptureActivity.java:153)
02-12 16:13:11.519: W/CaptureActivity(28307): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
02-12 16:13:11.519: W/CaptureActivity(28307): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615)
02-12 16:13:11.519: W/CaptureActivity(28307): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
02-12 16:13:11.519: W/CaptureActivity(28307): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
02-12 16:13:11.519: W/CaptureActivity(28307): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
02-12 16:13:11.519: W/CaptureActivity(28307): at android.os.Handler.dispatchMessage(Handler.java:99)
02-12 16:13:11.519: W/CaptureActivity(28307): at android.os.Looper.loop(Looper.java:130)
02-12 16:13:11.519: W/CaptureActivity(28307): at android.app.ActivityThread.main(ActivityThread.java:3687)
02-12 16:13:11.519: W/CaptureActivity(28307): at java.lang.reflect.Method.invokeNative(Native Method)
02-12 16:13:11.519: W/CaptureActivity(28307): at java.lang.reflect.Method.invoke(Method.java:507)
02-12 16:13:11.519: W/CaptureActivity(28307): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
02-12 16:13:11.519: W/CaptureActivity(28307): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
02-12 16:13:11.519: W/CaptureActivity(28307): at dalvik.system.NativeStart.main(Native Method)
Sorry for inconvinience pls help me
Hi Mukesh can you please send me the full source code the QR Code Scanner.zip is not clickable
ReplyDeleteMy email id:prudhvi.1245@gmail.com
Sure
ReplyDeleteHi Mukesh can you please send me the full source code the QR Code Scanner.zip cant not downloaded.:(
ReplyDeleteMy email :evayeeyet@gmail.com
Hello Peter, in your case you are not adding the core.jar in your build path due to this your sec folder showing the lote of error. Add the core.jar in your project build path and clean build your project....Hope it fix.
ReplyDeleteHello Mukesh,
ReplyDeletefirst of all I would like to thank you for the great tutorial. Could you please tell me if the application above is a stand alone app or does it call the barcode scanner found on the phone?
Hoping to hear from you soon
thanks :)
Hello Niraj,
ReplyDeleteNo need of barcode scanner app, this application uses zxing as a library project which open a camera by calling the Intent and scan your qr code.
hi Mukesh.
ReplyDeleteAppreciate if you can provide me full source code. I am not able to download it here.
email: nissathanin@gmail.com
hi Mukesh,
ReplyDeleteGreat tutorial. I could not find anywhere a simpler and complete tutorial for zxing qr code integration. Thank you.
Could you please send the complete source to vyshakh.r@gmail.com? thanks in advance
Where is the link for running code
ReplyDeletewhile running the above code these are my exception please help me out
ReplyDelete02-26 20:15:56.140: E/AndroidRuntime(19938): FATAL EXCEPTION: main
02-26 20:15:56.140: E/AndroidRuntime(19938): java.lang.ExceptionInInitializerError
02-26 20:15:56.140: E/AndroidRuntime(19938): at java.lang.Class.newInstanceImpl(Native Method)
02-26 20:15:56.140: E/AndroidRuntime(19938): at java.lang.Class.newInstance(Class.java:1429)
02-26 20:15:56.140: E/AndroidRuntime(19938): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
02-26 20:15:56.140: E/AndroidRuntime(19938): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
02-26 20:15:56.140: E/AndroidRuntime(19938): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
02-26 20:15:56.140: E/AndroidRuntime(19938): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
02-26 20:15:56.140: E/AndroidRuntime(19938): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
02-26 20:15:56.140: E/AndroidRuntime(19938): at android.os.Handler.dispatchMessage(Handler.java:99)
02-26 20:15:56.140: E/AndroidRuntime(19938): at android.os.Looper.loop(Looper.java:123)
02-26 20:15:56.140: E/AndroidRuntime(19938): at android.app.ActivityThread.main(ActivityThread.java:4627)
02-26 20:15:56.140: E/AndroidRuntime(19938): at java.lang.reflect.Method.invokeNative(Native Method)
02-26 20:15:56.140: E/AndroidRuntime(19938): at java.lang.reflect.Method.invoke(Method.java:521)
02-26 20:15:56.140: E/AndroidRuntime(19938): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
02-26 20:15:56.140: E/AndroidRuntime(19938): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
02-26 20:15:56.140: E/AndroidRuntime(19938): at dalvik.system.NativeStart.main(Native Method)
02-26 20:15:56.140: E/AndroidRuntime(19938): Caused by: java.lang.NoClassDefFoundError: com.google.zxing.ResultMetadataType
02-26 20:15:56.140: E/AndroidRuntime(19938): at com.google.zxing.client.android.CaptureActivity.(CaptureActivity.java:101)
Hello charan ,
ReplyDeleteYou are getting java.lang.NoClassDefFoundError:
because you are not adding the core.jar library project in your build path.
Try to add it in your build path and then clean your app and reun it.
thanks mukesh its heal alto to me
ReplyDeleteHi Mukesh,
ReplyDeleteThanks for the blog its really great.
However, I am facing a problem. I don't have any errors and after I click the button the app is crashing.
Any help?
Hi,
ReplyDeleteI think the crash is because of the configuration issue.There are two reason 1. Your application can't find the capture activity class.
2. You are missing something during configuration of zxing library.
But until and unless If you not provide me any log cat or error I can't help you more.
Please find below the error any help ?
ReplyDelete02-28 03:09:23.465: W/CaptureActivity(786): android.content.pm.PackageManager$NameNotFoundException: com.google.zxing.client.android
02-28 03:09:23.465: W/CaptureActivity(786): at android.app.ApplicationPackageManager.getPackageInfo(ApplicationPackageManager.java:86)
02-28 03:09:23.465: W/CaptureActivity(786): at com.google.zxing.client.android.CaptureActivity.showHelpOnFirstLaunch(CaptureActivity.java:676)
02-28 03:09:23.465: W/CaptureActivity(786): at com.google.zxing.client.android.CaptureActivity.onCreate(CaptureActivity.java:153)
02-28 03:09:23.465: W/CaptureActivity(786): at android.app.Activity.performCreate(Activity.java:4470)
02-28 03:09:23.465: W/CaptureActivity(786): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1053)
02-28 03:09:23.465: W/CaptureActivity(786): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1934)
02-28 03:09:23.465: W/CaptureActivity(786): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1995)
02-28 03:09:23.465: W/CaptureActivity(786): at android.app.ActivityThread.access$600(ActivityThread.java:128)
02-28 03:09:23.465: W/CaptureActivity(786): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1161)
02-28 03:09:23.465: W/CaptureActivity(786): at android.os.Handler.dispatchMessage(Handler.java:99)
02-28 03:09:23.465: W/CaptureActivity(786): at android.os.Looper.loop(Looper.java:137)
02-28 03:09:23.465: W/CaptureActivity(786): at android.app.ActivityThread.main(ActivityThread.java:4517)
02-28 03:09:23.465: W/CaptureActivity(786): at java.lang.reflect.Method.invokeNative(Native Method)
02-28 03:09:23.465: W/CaptureActivity(786): at java.lang.reflect.Method.invoke(Method.java:511)
02-28 03:09:23.465: W/CaptureActivity(786): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:993)
02-28 03:09:23.465: W/CaptureActivity(786): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:760)
02-28 03:09:23.465: W/CaptureActivity(786): at dalvik.system.NativeStart.main(Native Method)
02-28 03:09:23.475: D/AndroidRuntime(786): Shutting down VM
02-28 03:09:23.475: W/dalvikvm(786): threadid=1: thread exiting with uncaught exception (group=0x40c0aa68)
02-28 03:09:23.495: E/AndroidRuntime(786): FATAL EXCEPTION: main
02-28 03:09:23.495: E/AndroidRuntime(786): java.lang.RuntimeException: Unable to resume activity {com.xlabs.qrscan/com.google.zxing.client.android.CaptureActivity}: java.lang.NullPointerException
02-28 03:09:23.495: E/AndroidRuntime(786): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2458)
02-28 03:09:23.495: E/AndroidRuntime(786): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2486)
02-28 03:09:23.495: E/AndroidRuntime(786): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2000)
The rest of the error
ReplyDelete02-28 03:09:23.495: E/AndroidRuntime(786): at android.app.ActivityThread.access$600(ActivityThread.java:128)
02-28 03:09:23.495: E/AndroidRuntime(786): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1161)
02-28 03:09:23.495: E/AndroidRuntime(786): at android.os.Handler.dispatchMessage(Handler.java:99)
02-28 03:09:23.495: E/AndroidRuntime(786): at android.os.Looper.loop(Looper.java:137)
02-28 03:09:23.495: E/AndroidRuntime(786): at android.app.ActivityThread.main(ActivityThread.java:4517)
02-28 03:09:23.495: E/AndroidRuntime(786): at java.lang.reflect.Method.invokeNative(Native Method)
02-28 03:09:23.495: E/AndroidRuntime(786): at java.lang.reflect.Method.invoke(Method.java:511)
02-28 03:09:23.495: E/AndroidRuntime(786): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:993)
02-28 03:09:23.495: E/AndroidRuntime(786): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:760)
02-28 03:09:23.495: E/AndroidRuntime(786): at dalvik.system.NativeStart.main(Native Method)
02-28 03:09:23.495: E/AndroidRuntime(786): Caused by: java.lang.NullPointerException
02-28 03:09:23.495: E/AndroidRuntime(786): at com.google.zxing.client.android.CaptureActivity.onResume(CaptureActivity.java:167)
02-28 03:09:23.495: E/AndroidRuntime(786): at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1158)
02-28 03:09:23.495: E/AndroidRuntime(786): at android.app.Activity.performResume(Activity.java:4544)
02-28 03:09:23.495: E/AndroidRuntime(786): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2448)
02-28 03:09:23.495: E/AndroidRuntime(786): ... 12 more
02-28 03:09:23.525: E/android.os.Debug(376): !@Dumpstate > dumpstate -k -t -n -z -d -o /data/log/dumpstate_app_error
Hi, Your application didn't find the CaptureActivity class. This is a configuration issue please provide the right package name and also rememeber to add zxing lib in your build . Otherwise it give you CaptureActivity class not found error and also package name error under which your CaptureActivity class has been placed.
ReplyDeletehi Mukesh,
ReplyDeleteGreat tutorial.
Could you please send the complete source to vzodic@libero.it? thanks in advance
Thanks Mukesh its working now ...
ReplyDeletebut I get options once the scanning is done I just want to view the QR code in a text view.
Once i read the code , in my screen appears 3 options:1) Send via sms , 2)share via e-mail and the last one , 3)search on the web.
I want the read input go directly to my textview and not sshowing these options i am mentioning now.Could you help?
It seems to me that the function onActivityResult is never accessed.
ReplyDeleteHey Thanks,
ReplyDeleteYou have to fetch this data on your onActivityResult() method and there you can set it to textview.
For getting back to your onActivityResult() method.You have to do 2 things:
ReplyDelete1. Calling the intent as startActivityForResult() as I am doing in above code.
2. After this , getting the scan result in your extras of onActivityResult() method, you have to add this in the CaptureActivity Class inside the handleDecode() method
Intent intent = new Intent();
intent.putExtra("RESULT", resultHandler.getDisplayContents().toString());
setResult(1,intent);
CaptureActivity.this.finish();
This helps you in both calling the onActivity method and also show the QR code on a text view.
Hi Mukesh,
ReplyDeleteI got the following Runtime Exception.
Do you have any idea, whats wrong here?
FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to resume activity com.example.firsttrialapp/com.google.zxing.client.android.CaptureActivity}: java.lang.ClassCastException: android.widget.TextView cannot be cast to com.google.zxing.client.android.ViewfinderView
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2866)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2895)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2359)
at android.app.ActivityThread.access$600(ActivityThread.java:150)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1244)
...
Would be great, if you would have any proposal!
Thank you!
hi..
ReplyDeletei got following Runtime error after clicking SCAN button..
and i did all u above suggested solution !!
Help me :(
justnitinjadhav@gmail.com
-----------
D/szipinf(14119): Initializing inflate state
D/dalvikvm(14119): GC_EXTERNAL_ALLOC freed 48K, 50% free 2694K/5379K, external 0K/0K, paused 422ms
D/AndroidRuntime(14119): Shutting down VM
W/dalvikvm(14119): threadid=1: thread exiting with uncaught exception (group=0x40018560)
FATAL EXCEPTION: main
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.google.zxing.client.android.SCAN (has extras) }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1409)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1379)
at android.app.Activity.startActivityForResult(Activity.java:2827)
at com.example.testbarcode.MainActivity$1.onClick(MainActivity.java:34)
at android.view.View.performClick(View.java:2501)
at android.view.View$PerformClick.run(View.java:9107)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3835)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:847)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
at dalvik.system.NativeStart.main(Native Method)
Hello Nitin,
ReplyDelete1. I think in your code instead of calling
Intent intent = new Intent(TestQRCodeActivity.this,
CaptureActivity.class);
you are calling this,
Intent intent = new Intent("com.google.zxing.client.android.SCAN");
2. Also cross check once again for the activity class declaration in your androidmanifest.xml .
Thanks a lot Mukesh! Great one!
ReplyDeleteThanks and Welcome Alonge...
ReplyDeleteCould you please send the complete source to hed-marlino@hotmail.fr ? thanks in advance
ReplyDeleteHello Hédi ,
ReplyDeleteI have provided all links and code in my blog please go step by step , I don't think you faced any issue in the integration of QR code.
If you have any query or problem feel free to ask.
hi mukesh...
ReplyDeleteI am not able to download your source code. can you pls mail me the whole code at : kan.amruthanair@gmail.com
Thanks in advance
hello mukesh,
ReplyDeletei want somethng like this for my application.but i am not able download your source code.Can you please mail me the same at: kan.amruthanair@gmail.com
Thanks in advance
Hey Hi Amrutha, sorry for late response....
ReplyDeleteYou can download the code from here and follow
the steps...
http://code.google.com/p/zxing/source/browse/trunk
Hi, I added zxing library into my app. There is no error. But when i click scan button(b),
ReplyDeletemy app crashed. These are errors;
FATAL EXCEPTION: main
java.lang.ExceptionInInitializerError
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1409)
at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop
(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NoClassDefFoundError: com.google.zxing.ResultMetadataType
at com.google.zxing.client.android.CaptureActivity.(CaptureActivity.java:101)
Hello Emrah Şentürk,
ReplyDeleteYou are getting this
error: java.lang.NoClassDefFoundError
This happens when youe lib project is not configure correctly ,and your class not find any claas or package i.e com.google.zxing.ResultMetadata in your case.
Can you share the code on button click...
Can you plz send me the full code
ReplyDeletemr.jabbasi@gmail.com
Hi,
ReplyDeleteI changed my code. Now I am using intentintegrator and intentresult. And my code is working. But I must link to barcode scanner app from my web server. How to do it?
Hi Mukesh,
ReplyDeleteThis tutorial is by far the best among others which i referred on internet which can be easily understood.
Am facing the same error " com.google.zxing.ResultMetadata" class not found error. I have built the core.jar and included in BiuldPath and imported few classes as well which detected core.jar.
But why am still receiving the error, any help would be very much appreciated. Could you please mail the project to niteesh.g@gmail.com
Hi Mukesh,
ReplyDeleteCould you please email me the complete source code to junal@devdec.com
Thanks!
Thanks a lot Mukesh!
ReplyDeleteWorking excelent.
thanks and welcome...
ReplyDeletehi mukesh,
ReplyDeletei get this error. what is the solution
java.lang.NullPointerException
at com.google.zxing.client.android.ViewfinderView.onDraw(ViewfinderView.java:83)
Unable to view coments
ReplyDeletehi there, i really loved your post here. my name is Salman, and i am an undergraduate currently doing my final year project which deals with designing a qrcode scanner as part of the project. what i intend to have is a scanner that will read a code and only direct you to a link that is preconfigured on the app, and will block redirecting to any other link. i have no knowledge of android development, and i was really hoping you will help me acomplish this. my email is techoctober@gmail.com, anticipating your response thanks.
ReplyDeleteHello Salman,
ReplyDeleteJust call webview inside onActivityResult() method,
replace the code where I am showing the toast message with the webview .
can u plz mail me code at suman.sarita08@gmail.com
ReplyDeletethanx
Hello Mukesh,
ReplyDeleteI am Nitin Gupta
Thank you very much your code is successfully integrated in App
but i am using action bar(Fragments) in my application on that condition scanner is not working on rectangle with red line is coming t is not scanning
your suggestions are required
Thank you
Hi Mukesh,
ReplyDeleteThank you so much for this tutorial. At first I wasn't able to get onActivityResult to kick off, but I read through the comments and found your solution. As we are incorporating the core into the project we don't have to worry about the rest of handleDecode since we are returning the result to our activity.
For others benefit my handleDecode method in CaptureActivity now only contains this and returns to my onActivityResult() method.
public void handleDecode(Result rawResult, Bitmap barcode, float scaleFactor) {
inactivityTimer.onActivity();
lastResult = rawResult;
ResultHandler resultHandler = ResultHandlerFactory.makeResultHandler(this, rawResult);
Intent intent = new Intent();
intent.putExtra("RESULT", resultHandler.getDisplayContents().toString());
setResult(1,intent);
CaptureActivity.this.finish();
}
Thanks thanks thanks!
Hello, Nitin Gupta
ReplyDeleteI have not run this code with fragment so I am not sure about the problem you are facing.
But, yes if you provide me the sample code on which you are getting the error then may be I will help you in fixing it.You may share your code on my gamil id: mukesh421985@gmail.com
Mukesh ji,
ReplyDeletewhat to do with this
FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to resume activity com.example.barcodescanningapp/com.google.zxing.client.android.CaptureActivity}: java.lang.ClassCastException: android.widget.TextView cannot be cast to com.google.zxing.client.android.ViewfinderView
hello,
ReplyDeleteI think this will happen when you calling onActivityForResult() and get the the result.
Please check where you setting the data in bundle and returning it to your calling activity.
Mukesh ji,
ReplyDeleteHighly appriciate if you can guide us on below issue:
FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to resume activity com.example.barcodescanningapp/com.google.zxing.client.android.CaptureActivity}: java.lang.ClassCastException: android.widget.TextView cannot be cast to com.google.zxing.client.android.ViewfinderView
Great tutorial. You made my day...
ReplyDeleteThanks a lot..
ReplyDeletehey mukesh...this code is giving run time error(unable to startactivity CaptureActivity)...can u pls help me?
ReplyDeleteHello KUSHMINDER,
ReplyDeleteHave you added the CaptureActivity in Androidmanifest.xml??
Please provide some more logs so can I help you.
Hello Mukesh,
ReplyDeleteI am getting following error:
CaptureActivity cannot be resolved to a type MainActivity.java
The import com.google.zxing.client.android cannot be resolved MainActivity.java
how to solve above error?
Thank you.
Pram
Hello,
ReplyDeleteIt means whne you are calling
Intent intent = new Intent(TestQRCodeActivity.this,
CaptureActivity.class);
Your application not able to find the location of CaptureActivity.class.
Please check the androidmanifest.xml file and also cross check that core.jar lib is added properly.
I when a create the jar and put on my android project, the eclipse don't found the class in the import com.google.zxing.client.android.CaptureActivity;
ReplyDeleteIury Ferreira,
ReplyDeletePlease add your jar in your project build path.
Hi Mukesh,
ReplyDeleteI followed all the steps without getting errors but when I launch the application, it quits and gives these errors in Console:
"An established connection was aborted by the software in your host machine
java.io.IOException: An established connection was aborted by the software in your host machine
at sun.nio.ch.SocketDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(Unknown Source)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.write(Unknown Source)
at sun.nio.ch.SocketChannelImpl.write(Unknown Source)
at com.android.ddmlib.JdwpPacket.writeAndConsume(JdwpPacket.java:213)
at com.android.ddmlib.Client.sendAndConsume(Client.java:607)
at com.android.ddmlib.HandleHeap.sendREAQ(HandleHeap.java:348)
at com.android.ddmlib.Client.requestAllocationStatus(Client.java:453)
at com.android.ddmlib.DeviceMonitor.createClient(DeviceMonitor.java:835)
at com.android.ddmlib.DeviceMonitor.openClient(DeviceMonitor.java:803)
at com.android.ddmlib.DeviceMonitor.processIncomingJdwpData(DeviceMonitor.java:763)
at com.android.ddmlib.DeviceMonitor.deviceClientMonitorLoop(DeviceMonitor.java:652)
at com.android.ddmlib.DeviceMonitor.access$100(DeviceMonitor.java:44)
at com.android.ddmlib.DeviceMonitor$3.run(DeviceMonitor.java:580)"
What should I do?
hi mukesh. thanks for this tutorial..
ReplyDeleteI am an undergraduate student. I got toast on method onActivityResult not show after scanning the QR code, how I can resolve this problem?
thanks before
Hi Mukesh,
ReplyDeleteIn the above example I am having trouble in Step 2. Kindly guide me in creating core.jar.
Your blog post was very helpful for my project. thank you.
ReplyDeleteHye Mukesh,
ReplyDeleteIm just trying the tutorial above but its not working.
Could you please send me the full source code of the QR Code Scanner.
Email : zuleffendykamal@gmail.com
Thx.
hi mukesh i couldnt get core.jar file...can u elobarate in detailed manner..please
ReplyDeleteCan You please share core.jar.
ReplyDeletehi mukesh...
ReplyDeleteI am not able to download your source code. can you pls mail me the full code at : 274611049@qq.com
Thanks in advance
Thank you so much
ReplyDeleteHi Please can you share your core.jar file?
ReplyDeleteAs I cant seem to build one with your initial steps and the version from Maven doesnt seem to include the CaptureActivity class.
Thanks,
Nazrul
nazrulamin52@gmail.com
I can't find the download link..
ReplyDeleteCan you email the zip file to my email?
sunny_tan0627@livemail.tw
:( I tried to do it myself but I failed...
thank you very much :)
Hi .. i have problem in get core.jar file, i can't able to create that, can u please share your code with core.jar file..
ReplyDeleteI got some error in Zxing library project.. can u share me the code..
ReplyDeletethanks a lot for sharing your knowledge
ReplyDeletebut the size of application which only contain the scanner exceeds 2MB is there anyway to reduce this file size?
Best Regards
Hi,
ReplyDeletecan you please send me the complete code.
email:dhaval.p90@gmail.com
Hi,
ReplyDeleteI tried copying core.jar downloaded from Maven website in to my Android App's libs/ folder. I can see this getting included in Java Build Path as well. There is no compilation error around here. However, when I launch my app where I am starting the Scanner activity via Intent, I am still prompted to download Barcode Scanner application. I am looking for a "third-party-application-free" solution where user should not be required to download another application to use my app feature. Just copying core.jar is not helping. Can you please advise here what I am missing out? Thanks!
Hello Mukesh,
ReplyDeleteThanks for your support, but I am stuck on 2nd step because I am not familiar with "apache ant", thats why I can't create core.jar file. Please explain 2nd step in brief.
I am waiting for your positive response.
Thanks dude,
From,
Shailesh Vishwase
Hi Mukesh I did Same Way but while producing .apk file I am getting error like "[2013-10-02 09:26:44 - QRCODE] D:\CDAC\QR READER\ZXing-2.2\zxing-2.2\android\res\xml\preferences.xml:84: error: Error: No resource found that matches the given name (at 'entries' with value '@array/country_codes').
ReplyDelete[2013-10-02 09:26:44 - QRCODE] D:\CDAC\QR READER\ZXing-2.2\zxing-2.2\android\res\xml\preferences.xml:84: error: Error: No resource found that matches the given name (at 'entryValues' with value '@array/country_codes')."
Hello Mukesh
ReplyDeleteThank you so much for the tutorial.
I'm experiencing a problem, when I run the build.xml file using command prompt to generate the core.jar file, I do not get the jar file, instead I get another zipped zxing folder with another build.xml file..
Please help
Thanks so much Adam Bannach!!!! Spent a whole day on this.
ReplyDeleteOh and thanks a lot Mukesh too!
ReplyDeleteIts really ,nice blog.covering all android solution...very thanks to Mukesh...
ReplyDeleteHye Mukesh,
ReplyDeleteIm just trying the tutorial above but its not working.
Could you please send me the full source code of the QR Code Scanner.
Email : vicgordienko@gmail.com
Thx.
Thank you very much for the code, I want vertical orientation of camera while reading bar-code, can you please help me.
ReplyDeleteChange the android:screenOrientation="Portrait" in AndroidManifest.xml file.
ReplyDeleteI did this (android:screenOrientation="Portrait") but it is not properly reading bar-code as it was doing in Landsacpe orientation
ReplyDeleteYes, agree this is a small issue I too faced while doing my scanner app.I go through some forum but they too suggest to use "landscape" for better performance.That's why I am using in landscape mode.
ReplyDeleteMay be in the latest zxing lib code they will be fixed this issue also...not sure.
Ok, But My client is not happy with that so can you suggest any other libraries for reading bar-code
ReplyDeleteIF u only want to scan bar code then use "BarcodeScanner". The above one is work for both barcode as well as qr code scanner.
ReplyDeleteThank you for the help
ReplyDeleteHello Mukesh, I'm having some troubles adding the zxing library. The folder Core no longer contains a build.xml, so I've tried downloading a new one from the Zxing website.
ReplyDeleteAfter following the tutorial, Eclipse isn't able to find the package com.google.zxing and therefore the CaptureActivity class.
Also, in myproject - properties - android - libraries - android dependencies appears a new entry; captureactivity.jar with an error:
captureactivity.jar - /home/myuser/zxing-read-only/android/bin (missing)
Any ideas of what could be causing this?
Hello Victor, Please clean your project and then try it.
ReplyDeleteSeems that the problem was that the core.jar wasn't in my /lib. After I moved it, the code error was gone.
ReplyDeleteNow I'm trying to execute the app in the emulator.
Thank you for your time Mukesh, and for your dedication!
Okay..Thanks and welcome Victor
ReplyDeletehow can i change the orientation in portrait of scanning screen
ReplyDeletechange the code in manifest file
ReplyDeleteandroid:screenOrientation="landscape" to "portrait"
Hi, Mukesh Yadav,
ReplyDeleteCan u send me the source code as I no longer can see the scanner.zip?
Email: eileenchong001@hotmail.com
Thanks :D
Hi Mukesh can you please send me the full source code. The QR Code Scanner.zip is not clickable
ReplyDeleteMy email id: arigela.avinash@gmail.com
Mukesh i am not bale to generate core.jar from ant can u provide me core.jar ,
ReplyDeletemy email id is dhiraj.linkites@gmail.com
Hi I'm new to android programming, I want to make an android app which reads a QR code with the phone camera and fetch the data from the QR code on reading it. how do I go forward with it?
ReplyDeleteHello Mukesh,
ReplyDeleteI've imported core.jar, clean projects, and also set the build path as your suggestions on reply posts above, but i still got this error during compiling my apps on logcat:
02-02 02:49:59.794: E/AndroidRuntime(556): FATAL EXCEPTION: main
02-02 02:49:59.794: E/AndroidRuntime(556): java.lang.ExceptionInInitializerError
02-02 02:49:59.794: E/AndroidRuntime(556): at java.lang.Class.newInstanceImpl(Native Method)
02-02 02:49:59.794: E/AndroidRuntime(556): at java.lang.Class.newInstance(Class.java:1429)
02-02 02:49:59.794: E/AndroidRuntime(556): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
02-02 02:49:59.794: E/AndroidRuntime(556): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
02-02 02:49:59.794: E/AndroidRuntime(556): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
02-02 02:49:59.794: E/AndroidRuntime(556): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
02-02 02:49:59.794: E/AndroidRuntime(556): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
02-02 02:49:59.794: E/AndroidRuntime(556): at android.os.Handler.dispatchMessage(Handler.java:99)
02-02 02:49:59.794: E/AndroidRuntime(556): at android.os.Looper.loop(Looper.java:123)
02-02 02:49:59.794: E/AndroidRuntime(556): at android.app.ActivityThread.main(ActivityThread.java:4627)
02-02 02:49:59.794: E/AndroidRuntime(556): at java.lang.reflect.Method.invokeNative(Native Method)
02-02 02:49:59.794: E/AndroidRuntime(556): at java.lang.reflect.Method.invoke(Method.java:521)
02-02 02:49:59.794: E/AndroidRuntime(556): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
02-02 02:49:59.794: E/AndroidRuntime(556): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
02-02 02:49:59.794: E/AndroidRuntime(556): at dalvik.system.NativeStart.main(Native Method)
02-02 02:49:59.794: E/AndroidRuntime(556): Caused by: java.lang.NoClassDefFoundError: com.google.zxing.ResultMetadataType
02-02 02:49:59.794: E/AndroidRuntime(556): at com.google.zxing.client.android.CaptureActivity.(CaptureActivity.java:91)
02-02 02:49:59.794: E/AndroidRuntime(556): ... 15 more
And while compiling it, on Console window it shows :"CaptureActivity] Could not find CaptureActivity.apk!".
Could you tell me what is it mean ?
Really needs help here..
Thanx a lot b4
Hi..Great Tutorial, but I have a little problem.
ReplyDeleteI include the library correctly but I can't manage the result.
My aim is:
1) scan the QR-code;
2) manage the content of the scan without the classic choose ("search via internet", "send via sms", etc).
I whould scan and manage the result. Can I do this?
Thanks..
You will need to build the core project into a jar file using apache ant
ReplyDelete(download from here http://ant.apache.org/ivy/download.cgi).
Using a shell or cmd prompt navigate to the root directory of
the downloaded zxing src and execute “ant -f core/build.xml” Somebody can explain me this? I am novice. Thank you
Can u send me the source code to my email account??
ReplyDeleteBecause i cant download ur source code.
stevechyi@gmail.com
Thank you
Hi Mukesh,
ReplyDeletefantastic tutorial! Perfectly dsecribed, for mewbees like me as well;-)
Could you please send the zip file to me as well?
My mail: fedmom@gmx.de
Thanks a TON !
qr code scanner must work very fast and get result less then 2sec. if any one have ideas about QRcode reader on java. i need some one help to integration of QRcode reader.
ReplyDeleteHey Mukesh,
ReplyDeleteI just need QR Scanner so can u please mail me the QR Code Scanner Source code on my mail ID- karishmapkale@gmail.com..??
Hi Mukesh,
ReplyDeleteCould you send me the code, please?
email: reg@wiki-workers.com
Thanks
Can u send me the source code to my email account??
ReplyDeleteBecause i cant download ur source code.
birasanth1101@gmail.com
Thank you
Hello,
ReplyDeleteCan you please email me full source code of your app? I really need it on my project.
Nice tutorial.I am not able to download source code .Please mail me the code for qr scanner.
ReplyDeletemanjit5686@gmail.com
Nice tutorial.Please mail me the code for qr scanner .
ReplyDeletemanjit5686@gmail.com
Please can you send me too the code at jegathaaa@gmail.com?
ReplyDeleteThank you
Can you send me the source code to my email account. Much Thanks.
ReplyDeletesuda51@outlook.com
Hi Mukesh,
ReplyDeleteCould you send me the code, please?
email: anya230294@gmail.com
Thanks
Hi Mukesh,
ReplyDeleteCould you send me the code, please?
email: nutka98@yandexru
Thanks
Hi, I don't understand why the same coding is scanning only barcodes for me and not QR codes.
ReplyDeleteHi Mukesh! Would you be kind to send me the code for the QR scanner too, please? Sorry for the trouble and thank you for your article!
ReplyDeleteemail: dimineti_la_oshima@yahoo.com
Can anyone please mail me the code at shrinivas.v.pai@gmail.com it would be great help
ReplyDeletei have heard abou Zxing qr code scanner, i am using this java qr code reader right now:
ReplyDeletewant to have a change, please email me source code. will test it until i use it.
Hi Mukesh,
ReplyDeleteCan u please provide the code for Zxing library in portrait view. Scanning both qr and barcodes i needed. please help me
Cool!
ReplyDeletework.. ;)
ReplyDeleteHi MuKesh, I am getting this exception. Please have a look.
ReplyDeletejava.lang.RuntimeException: Unable to start activity ComponentInfo{tv.saamnang.activity/com.google.zxing.client.android.CaptureActivity}: android.content.res.Resources$NotFoundException: File res/xml/preferences.xml from drawable resource ID #0x7f050000
I have the same problem:
Deletejava.lang.RuntimeException: Unable to start activity ComponentInfo{com.testqrcode/com.google.zxing.client.android.CaptureActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x0
I am running at my end its working fine, can you please drop me your code so that I debug it and rectify it.
DeletePlease share your code with me at kmbuco@gmail.com.Regards.
ReplyDeletei am using android studio for the integration..but i am not able to integrate can you help me with android studio integration please
ReplyDeleteCan i have a download link of your code? i tried to follow what you said but i cant import a project from that link in git, my eclipse cant identify android folder as a project, can u please help me? noob here
ReplyDeletecan you give me download link of your code? i tried to follow your direction but my eclipse cant identify that android folder from git as a project. thanks
ReplyDelete@MUKESH YADAV,
ReplyDeleteI am trying your steps to do same but while creating jar it shows me error. like
D:\xxx\ZXING SVN CODE>ant -f core/build.xml
Buildfile: core\build.xml does not exist!
Build failed.
I am completely stuck here please do help.plz plz
Hello Sandeep.
ReplyDeleteDownload the jar directly from here:
http://mvnrepository.com/artifact/com.google.zxing/core/2.2
please let me know if you still facing the issue.
@mukesh, no words to thanks u. u saved my job.
DeleteI pleased to have ur reply! now I am trying to make android project from zxing svn as Library to add it as module in my project.
I am doing this all in Android studio.even I did it but that android project has many classes and it seems some are unused and apk becomes max size. possibly I just want scanning QR functions only. so I appreciate your support to do this. hope u will assist as I have seen lots of thread comments in your blog that shows you always help us.
Hi Mukesh,
ReplyDeleteWhen i pass intent to CaptureActivity, always open the back(secondry camera) camera, can you plz tell me how can i open the fron camera in this code.
plz tell me, i am stuck with this.
thanks
Hi Mukesh,
ReplyDeleteWhen i pass intent to CaptureActivity, always open the back(secondry camera) camera, can you plz tell me how can i open the fron camera in this code.
plz tell me, i am stuck with this.
thanks
Hi Mukesh,
ReplyDeleteWhen i pass intent to CaptureActivity, always open the back(secondry camera) camera, can you plz tell me how can i open the fron camera in this code.
plz tell me, i am stuck with this.
thanks
Hi,
ReplyDeleteI read the article. found it very helpful. I think it is for eclipse. Can you please share the project for android studio.. i am new to android..
Pretty article! I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing. Buzz App
ReplyDeleteBy far the best tutorial out there! Great work!!
ReplyDeletehi Mukesh Yadav,
ReplyDeleteThank you for the brilliant work! Could you please send me the code at byronova@gmail.com?
Many thanks! Byronn.
PS: Is there a way to adapt this for android studio?