blikoon / qrcodescanner Goto Github PK
View Code? Open in Web Editor NEWAndroid QR Code scanning library : QR Scanning library based on zxing for android devices API 15 and up
Android QR Code scanning library : QR Scanning library based on zxing for android devices API 15 and up
hie..
i m sorry but i could not run this code on my phone..
it gives me a notification saying 'Could not open your camera'
i have load qr from file picture but something happened "QR Code could not be scanned"
The GOT_RESULT
string in QrCodeActivity
which is used as the key for scan result that is passed as extra data with intent has an error.
It should have been com.blikoon.qrcodescanner.got_qr_scan_result
instead of com.blikoon.qrcodescanner.got_qr_scan_relult
, i.e., result
instead of relult
.
Caused by: android.database.CursorIndexOutOfBoundsException:
at android.database.AbstractCursor.checkPosition (AbstractCursor.java:466)
at android.database.AbstractWindowedCursor.checkPosition (AbstractWindowedCursor.java:136)
at android.database.AbstractWindowedCursor.getString (AbstractWindowedCursor.java:50)
at android.database.CursorWrapper.getString (CursorWrapper.java:137)
at com.blikoon.qrcodescanner.QrCodeActivity.getPathFromUri (QrCodeActivity.java:390)
at com.blikoon.qrcodescanner.QrCodeActivity.onActivityResult (QrCodeActivity.java:370)
at android.app.Activity.dispatchActivityResult (Activity.java:6998)
at android.app.ActivityThread.deliverResults (ActivityThread.java:4104)
I can't scan the qr code because the camera in the qr code app is blurry yet the phone's native camera works fine
06-29 14:40:09.753 11228-11228/com.yoeszch.qrscan E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.yoeszch.qrscan, PID: 11228
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=0, result=-1, data=Intent { dat=content://com.android.externalstorage.documents/document/primary:Download/1_erxqlzB_I0ExMJtHzKivJw.png flg=0x1 }} to activity {com.yoeszch.qrscan/com.blikoon.qrcodescanner.QrCodeActivity}: android.database.CursorIndexOutOfBoundsException: Index 0 requested, with a size of 0
at android.app.ActivityThread.deliverResults(ActivityThread.java:4491)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4534)
at android.app.ActivityThread.-wrap20(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1752)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6940)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Caused by: android.database.CursorIndexOutOfBoundsException: Index 0 requested, with a size of 0
at android.database.AbstractCursor.checkPosition(AbstractCursor.java:460)
at android.database.AbstractWindowedCursor.checkPosition(AbstractWindowedCursor.java:136)
at android.database.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:50)
at android.database.CursorWrapper.getString(CursorWrapper.java:137)
at com.blikoon.qrcodescanner.QrCodeActivity.getPathFromUri(QrCodeActivity.java:390)
at com.blikoon.qrcodescanner.QrCodeActivity.onActivityResult(QrCodeActivity.java:370)
at android.app.Activity.dispatchActivityResult(Activity.java:7547)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4487)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4534)
at android.app.ActivityThread.-wrap20(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1752)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6940)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
QRCode scanner is not working. I am using blikoon/QRCodeScanner library
Is there any possibility to toggle the flashlight via code?
Maybe expose a function in QRActivity
class that can allow us to toggle the flashlight programmatically instead of clicking in the camera preview? 😅
I've tried to switch on the flashlight using a utility flashlight class before launching the QRActivity (camera preview), however it always turns off the flashlight.
class FlashlightUtil(private val context: Context) {
fun toggleFlashlight(isOn: Boolean){
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
val camManager: CameraManager? = context.getSystemService(Context.CAMERA_SERVICE) as CameraManager?
var cameraId: String? = null
try {
cameraId = camManager?.cameraIdList?.get(0)
camManager?.setTorchMode(cameraId!!, isOn)
} catch (e: CameraAccessException) {
e.printStackTrace()
}
}
}
}
i am trying to scan QR code to connect hotspot in android 11 but it dosent work
hi
i use compile 'com.github.blikoon:QRCodeScanner:0.1.2' in my project
but android studio couldnt solve this library.
Once i click a button to scan this error occurred front of my screen
Notification: Could not open your camera
Can we use this library to scan bar code
startActivityForResult is deprecated
Loading the picture should scan the QR Code in the picture and update the caller app with info on the ui thread. Make the info readily available on the ui thread so it is usable right away
Problems when turning uri into a path to pass to the decode image method
It writes notification "Could not open your camera"
AFAIK it is common samsung's camera issue, should I describe more?
Im try to integrate with androidx, but after implementation i has a problem where dialog not showing any text. and it is said that reference on null value.
com.blikoon.qrcodescanner.QrCodeActivity}: android.database.CursorIndexOutOfBoundsException: Index 0 requested, with a size of 0
at android.app.ActivityThread.deliverResults(ActivityThread.java:5368)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:5407)
at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:67)
at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2253)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7870)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
Caused by: android.database.CursorIndexOutOfBoundsException: Index 0 requested, with a size of 0
at android.database.AbstractCursor.checkPosition(AbstractCursor.java:521)
at android.database.AbstractWindowedCursor.checkPosition(AbstractWindowedCursor.java:139)
at android.database.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:53)
at android.database.CursorWrapper.getString(CursorWrapper.java:141)
at com.blikoon.qrcodescanner.QrCodeActivity.getPathFromUri(QrCodeActivity.java:390)
at com.blikoon.qrcodescanner.QrCodeActivity.onActivityResult(QrCodeActivity.java:370)
at android.app.Activity.dispatchActivityResult(Activity.java:8388)
at android.app.ActivityThread.deliverResults(ActivityThread.java:5361)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:5407)
at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:67)
at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2253)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7870)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
Does this library supports switching between cameras? If yes, then how? If no, are you going to update lib w/ this functionality?
Could not open camera
Can you either remove these prints or enable a way to disable them, its kinda annoying to see in the console.
//TODO
How can we change the color of header on the camera screen using this library?
Can we change that?
Please help.
How can I make frame layout green angles a rounded angle. I know I have to write my code inside drawAngle
method of QrCodeFinderView
. But I can`t figure out how to do it.
Thanks
This will improve easy onboarding
Hi,
I use 2 android phone for this test case.
1st phone use Camera to scan 2nd phone screen QR code (125x125 resolution) from gallery that is using image view to preview it and is fixed size to (125x125 dp) (dp is equivalent to px).
2nd phone scan the QR code (125x125 resolution) from gallery.
Based on this method, they should be having the size of QR code to scan. (Correct me if I'm wrong.)
Result
1st phone always success
2nd phone will fail in some QR Code Picture.
Is there any solution to this?
By default, the QR scanner camera view is zoomed to 2x
cound not open camera
Change the color of the angles
Change the icons
Change position of texts for better results
i want to add capture image functionality in qecodeactivity class with additional button , can you provide the code for that ... the camera module doesnot seem to have it .
when I run the project it shows cannot open camera
To return to the other activity it stops working
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.