Barcode Generation Implementation in Mobile App

TRUETECH is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
Barcode Generation Implementation in Mobile App
Simple
~1 business day
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1054
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Implementing Barcode Generation in Mobile Apps

Need appears unexpectedly: warehouse wants to print labels from phone, retail—generate QR checks offline, logistics—create Code128 for shipping without server. Seems minor, but wrong library choice causes problems later.

What Formats Are Actually Needed and How to Generate

Linear barcodes—EAN-13, EAN-8, UPC-A, Code128, Code39, ITF—use different check digit algorithms. Can't mix: retailers scan EAN-13, couriers—Code128 with arbitrary symbols. QR and Data Matrix cover 2D.

iOS. CIFilter natively can generate QR (CIQRCodeGenerator), Aztec, Code128, PDF417. For EAN/UPC easier to take ZXingObjC or wrapper over ZXing—covers all formats at once. Render to CIImage, scale via CGAffineTransform (no interpolation, else pixel edges blur), export to PNG via UIGraphicsImageRenderer.

Android. ZXing (com.google.zxing:core:3.5.x)—de facto standard. MultiFormatWriter.encode() returns BitMatrix, draw to Bitmap via MatrixToImageWriter or manually iterating pixels. For Jetpack Compose—wrap in AndroidView with ImageView, or use BarcodeEncoder from journeyapps/zxing-android-embedded.

Flutter. barcode_widget (pub.dev) draws via Canvas without native code. For file output—toImage() via RepaintBoundary + RenderRepaintBoundary.toImage(pixelRatio: 3.0).

Typical Pitfalls

Scaling without interpolationQuality = .none (iOS) gives blurry edges—scanner can't read. Same on Android: Bitmap.createScaledBitmap(..., true) with filtering enabled destroys Code128 sharpness at small sizes.

Contrast: black on white—not "good by default." On dark app background need explicit fgColor/bgColor. QR on transparent won't read reliably in poor lighting.

Minimum QR size with error correction level M—150×150 dp. Lower—problems on cheap Android with 8MP camera.

Dynamic Content and Batch Generation

Barcodes often generated on-the-fly from data: product SKU, order number, user ID. Template approach: String.format("ORDER-%06d", orderId) → encode → render. For batch (example: 500 labels before shipment), generate in background thread DispatchQueue.global() / Executors.newFixedThreadPool(4) and show progress.

For barcode in PDF—integrate generation with PDFKit (iOS) / android.graphics.pdf.PdfDocument (Android): draw Bitmap barcode directly on PdfDocument.Page.canvas().

Save and Share

Generate to Bitmap/UIImage, save temp file via FileProvider (Android) or UIActivityViewController (iOS). Flutter—path_provider + share_plus. On Bluetooth printer (Zebra ZPL, Citizen) send ZPL command directly, not raster image—sharp at any DPI.

Timelines

Implementation of 2–3 formats with preview and share button—1 working day. If printer integration or batch generation with templates needed—2–3 days.