Reputation:
I have successfully integrate zxing scanner to my application.
I want to increase scanning are,and as the device resolution got changes screen set automatically.
I don`t want to give static height width.
I go through many blogs and solution but no one can able to give perfect solution
Any kind of help appreciated.
Thank you HapPy coding.
Upvotes: 0
Views: 637
Reputation: 28726
I'm not sure what you are talking about when you say the "scanning area", but I guess this the framingRect in zxing.
When you say that you have integrated the zxing scanner into your app: I guess you have made a library from this project and that you are simply using it.
The framingRect if by default 5/8 screen dimension. It is defined in CameraManager.java so if you really need to change it that's where you have to go.
In CameraManager.java you have this :
private static int findDesiredDimensionInRange(int resolution, int hardMin, int hardMax) {
int dim = 5 * resolution / 8; // Target 5/8 of each dimension
So to increase the area just change the 5 and the 8 according your needs. Also take a look at MAX_FRAME_WIDTH and MAX_FRAME_HEIGHT : this the maximum.
Upvotes: 0