Coder Social home page Coder Social logo

Reported not to work with android about qrgen HOT 7 CLOSED

kenglxn avatar kenglxn commented on June 30, 2024
Reported not to work with android

from qrgen.

Comments (7)

nelsonalmendra avatar nelsonalmendra commented on June 30, 2024

Confirmed. I tried to use it in an Android Application and I always get an exception.

from qrgen.

atomfrede avatar atomfrede commented on June 30, 2024

In my branch (https://github.com/atomfrede/QRGen/tree/modularize) I've split the library into three modules core, javase and android (so what do you think about that solution...)

core contains all stuff that can be used with android and standard java. javase is more or less the current state and android replaces all operations using a BufferedImage with android's Bitmap.
Nevertheless there are some minor drawbacks:

  • Not sure how an android library behaves when some transitive dependency has been build for java 7 (Android Supports java 7 since KitKat)
  • Robolectrics unit testing capabilties regarding Bitmaps are not optimal. I think they use a shadow for all Bitmap related stuff, therefore the File generated is broken and empty. But I've tested the implementation on a real emulator an the QRCodes are generated fine.

from qrgen.

kenglxn avatar kenglxn commented on June 30, 2024

Great work here as well @atomfrede . Perhaps I can get this as part of the next release. If not we should be able to solve this soon. I really want users of QRGen to be able to use ZXING as is, but at the same time get some convenience from QRGen. If we can solve the use case in a pretty way, then this will definately be a refactor I want to push :)

from qrgen.

atomfrede avatar atomfrede commented on June 30, 2024

Maybe a longer pre-release phase would be a good idea to test the android module extensive on different api levels. Would like to me to file a pull request or should I merge my work into master first? What about creating a development branch so that master is always ready to release even when larger refactorings happen (on dev branch)?

from qrgen.

kenglxn avatar kenglxn commented on June 30, 2024

I think the current setup works good, so I am hesitant to change it. Additionally, I don't want the overhead of having to configure and manage CI setup for two branches.

Could you update the Readme with a section for javase and one for android before making a PR.
Does this refactor cause breaking changes to existing users? If so the version should be bumped to 2.0-SNAPSHOT before PR as well.

from qrgen.

atomfrede avatar atomfrede commented on June 30, 2024

It will break something as current users have to change their pom (or gradle or whatever) as the location of the artifact has changed. Nevertheless the api is the same so there is no need to change the code (expect imports). Will prepare everything during the day and then file a PR.

from qrgen.

kenglxn avatar kenglxn commented on June 30, 2024

#17 fixes this. This fix is available in 2.0-SNAPSHOT. Will release 2.0 soon, after it has marinated in the intertubes a bit :)

from qrgen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.