How can I generate a barcode from a string in Swift?

You could use a CoreImage (import CoreImage) filter to do that! class Barcode { class func fromString(string : String) -> UIImage? { let data = string.data(using: .ascii) if let filter = CIFilter(name: “CICode128BarcodeGenerator”) { filter.setValue(data, forKey: “inputMessage”) if let outputCIImage = filter.outputImage { return UIImage(ciImage: outputCIImage) } } return nil } } let img = … Read more

What is the actual ASCII value of the FNC1 character in GS1 barcodes?

The special function characters such as FNC1 through FNC4 belong to the class of “non-data characters” that can be encoded within various barcode symbologies but with do not have any direct ASCII representation in the decoded data stream. Each symbology that supports such characters has a different scheme for encoding them in its internal representation … Read more

What is the actual HEX / binary value of the GS1 FNC1 character?

The special function characters such as FNC1 through FNC4 belong to the class of “non-data characters” that can be encoded within various barcode symbologies but with do not have any direct ASCII representation in the decoded data stream. Each symbology that supports such characters has a different scheme for encoding them in its internal representation … Read more

Generate barcode image in Android application

You can use zxing library to generate barcode easily. first, locate core.jar under libs folder. libs/core.jar You can download ZXing-2.1.zip from here. http://repo1.maven.org/maven2/com/google/zxing/ (source) After unzipping the file, find the jar file. \ZXing-2.1\zxing-2.1\core\core.jar And then write your own code like below. import java.util.EnumMap; import java.util.Map; import android.app.Activity; import android.graphics.Bitmap; import android.os.Bundle; import android.view.Gravity; import android.widget.ImageView; … Read more

Extracting information from a scanned GS1-type barcode

There are two processes involved in obtaining the information represented by a GS1-type barcode that stores data in GS1 Application Identifier Standard Format. Extraction of the data fields (referred to as Application Identifiers) contained within the GS1-structured data obtained by scanning the symbol. This always includes a unique identifier for the item called a GTIN-14 … Read more

BarCode Image Generator in Java

iText is a great Java PDF library. They also have an API for creating barcodes. You don’t need to be creating a PDF to use it. This page has the details on creating barcodes. Here is an example from that site: BarcodeEAN codeEAN = new BarcodeEAN(); codeEAN.setCodeType(codeEAN.EAN13); codeEAN.setCode(“9780201615883”); Image imageEAN = codeEAN.createImageWithBarcode(cb, null, null); The … Read more

How to ask runtime permissions for Camera in Android , Runtime storage permissions

Below I have written a code for granting a runtime permissions for Camera, There is an Array of String in which you can give multiple requests granting as which is needed at runtime. public class MainActivity extends AppCompatActivity { private static final int PERMISSION_REQUEST_CODE = 200; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); if … Read more