QRCodeHelper

open class QRCodeHelper

The QRCodeHelper class is useful to manage the QRCode

Author

N7ghtm4r3 - Tecknobit

Since

2.0.4

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
hosts list of current active hosts
Link copied to clipboard
val HTML_REPLACER: String = "<qrcode>"
HTML_REPLACER replacer to use if you need to customize your html page
Link copied to clipboard
qrcodes list of current active qrcodes FileInputStream created

Functions

Link copied to clipboard
private open fun checkToCreateDirs(pathName: String)
Method to check if the pathname (without the name and the suffix of the file to save) given by the user exists then if not exists create that pathname
Link copied to clipboard
open fun <T> createQRCode(data: T, path: String, squareDimension: Int): File
open fun <T> createQRCode(data: T, path: String, squareDimension: Int, backgroundColor: String): File
open fun <T> createQRCode(foregroundColor: String, data: T, path: String, squareDimension: Int): File
open fun <T> createQRCode(data: T, path: String, squareDimension: Int, foregroundColor: String, backgroundColor: String): File
Method to create a squared QRCode file
open fun <T> createQRCode(data: T, path: String, width: Int, height: Int): File
open fun <T> createQRCode(data: T, path: String, width: Int, height: Int, backgroundColor: String): File
open fun <T> createQRCode(foregroundColor: String, data: T, path: String, width: Int, height: Int): File
open fun <T> createQRCode(data: T, path: String, width: Int, height: Int, foregroundColor: String, backgroundColor: String): File
Method to create a QRCode file
Link copied to clipboard
private open fun createQRConfig(foregroundColor: String, backgroundColor: String): MatrixToImageConfig
Method to create a matrix config for customize the QRCode
Link copied to clipboard
open fun deleteQRCode(qrcode: File): Boolean
Method to delete a qrcode file created in the past
Method to delete a qrcode stream and the related file created in the past
Link copied to clipboard
open fun <T> getQRCodeStream(data: T, path: String, squareDimension: Int): FileInputStream
Method to create a squared QRCode and get its stream
open fun <T> getQRCodeStream(data: T, path: String, width: Int, height: Int): FileInputStream
open fun <T> getQRCodeStream(data: T, path: String, width: Int, height: Int, backgroundColor: String): FileInputStream
open fun <T> getQRCodeStream(foregroundColor: String, data: T, path: String, width: Int, height: Int): FileInputStream
open fun <T> getQRCodeStream(data: T, path: String, width: Int, height: Int, foregroundColor: String, backgroundColor: String): FileInputStream
Method to create a QRCode file and get its stream
open fun <T> getQRCodeStream(data: T, path: String, squareDimension: Int, backgroundColor: String): FileInputStream
open fun <T> getQRCodeStream(foregroundColor: String, data: T, path: String, squareDimension: Int): FileInputStream
open fun <T> getQRCodeStream(data: T, path: String, squareDimension: Int, foregroundColor: String, backgroundColor: String): FileInputStream
Method to create a squared QRCode file and get its stream
Link copied to clipboard
open fun <T> hostQRCode(port: Int, data: T, path: String, squareDimension: Int, perpetual: Boolean)
open fun <T> hostQRCode(port: Int, data: T, path: String, squareDimension: Int, perpetual: Boolean, htmlPage: File)
open fun <T> hostQRCode(port: Int, data: T, path: String, squareDimension: Int, perpetual: Boolean, backgroundColor: String)
open fun <T> hostQRCode(foregroundColor: String, port: Int, data: T, path: String, squareDimension: Int, perpetual: Boolean)
open fun <T> hostQRCode(port: Int, data: T, path: String, squareDimension: Int, perpetual: Boolean, htmlPage: File, backgroundColor: String)
open fun <T> hostQRCode(port: Int, data: T, path: String, squareDimension: Int, perpetual: Boolean, foregroundColor: String, backgroundColor: String)
open fun <T> hostQRCode(foregroundColor: String, port: Int, data: T, path: String, squareDimension: Int, perpetual: Boolean, htmlPage: File)
open fun <T> hostQRCode(port: Int, data: T, path: String, squareDimension: Int, perpetual: Boolean, htmlPage: File, foregroundColor: String, backgroundColor: String)
Method to create and host a squared QRCode file
open fun <T> hostQRCode(port: Int, data: T, path: String, width: Int, height: Int, perpetual: Boolean)
open fun <T> hostQRCode(port: Int, data: T, path: String, width: Int, height: Int, perpetual: Boolean, htmlPage: File)
open fun <T> hostQRCode(port: Int, data: T, path: String, width: Int, height: Int, perpetual: Boolean, backgroundColor: String)
open fun <T> hostQRCode(foregroundColor: String, port: Int, data: T, path: String, width: Int, height: Int, perpetual: Boolean)
private open fun <T> hostQRCode(data: T, path: String, width: Int, height: Int, socketManager: SocketManager, html: String, foregroundColor: String, backgroundColor: String)
open fun <T> hostQRCode(port: Int, data: T, path: String, width: Int, height: Int, perpetual: Boolean, htmlPage: File, backgroundColor: String)
open fun <T> hostQRCode(port: Int, data: T, path: String, width: Int, height: Int, perpetual: Boolean, foregroundColor: String, backgroundColor: String)
open fun <T> hostQRCode(foregroundColor: String, port: Int, data: T, path: String, width: Int, height: Int, perpetual: Boolean, htmlPage: File)
open fun <T> hostQRCode(port: Int, data: T, path: String, width: Int, height: Int, perpetual: Boolean, htmlPage: File, foregroundColor: String, backgroundColor: String)
private open fun <T> hostQRCode(port: Int, data: T, path: String, width: Int, height: Int, perpetual: Boolean, html: String, foregroundColor: String, backgroundColor: String)
Method to create and host a QRCode file
Link copied to clipboard
open fun readQRCode(QRCode: File): String
open fun readQRCode(QRCodePath: String): String
Method to read QRCode
Link copied to clipboard
open fun stopAllHosting()
Method to stop all the active hosting No-any params required
Link copied to clipboard
open fun stopHosting()
Method to stop a single hosting No-any params required
Link copied to clipboard
open fun stopHostingOn(port: Int)
Method to stop a single hosting