electrode-io / livebundle

LiveBundle CLI

Home Page:https://www.livebundle.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Split android library

belemaire opened this issue · comments

LiveBundle android library is currently having a dependency on me.dm7.barcodescanner:zxing library to enable QR Code scanning. This library is pretty popular when it comes to QRCode (or barcode) scanning, so it's possible that the target Android application will already make use of it, which could lead to version conflicts. While such conflicts can be usually resolved with gradle, this adds friction when it comes to LiveBundle adoption.

We should instead split our Android library so that we have a core one, without the scanner library, and in that case LiveBundle initialize call could take an additional interface that would need to be implemented by the client, containing a single async method to launch the scanner and return scanned string content. This way, the client application could just reuse any scanning library already present in the application.

The other library, is one that will only include this scanning interface implementation, with a dependency on me.dm7.barcodescanner:zxing. This way, if the target application does not have a scanning library already part of the application, they could just use LiveBundle built in one.