SucceedHQ Logo SucceedHQ

How to Implement Barcode and QR Code Scanning in a Nigerian Inventory App

By Daniel Lucky · May 27, 2026 · 9 min read

Nigerian wholesalers, retailers, and logistics operators increasingly need digital inventory management that works with existing product barcodes. Adding scanning capability to your inventory app removes the need for manual data entry, reduces stock errors, and speeds up stocktaking and dispatch workflows significantly.

This guide covers choosing the right scanning library, integrating the camera, handling different barcode formats, managing errors, and connecting scan results to your inventory database.

Common Myths vs. Facts About Barcode Scanning in Nigerian Apps

MythFact
You need expensive hardware to scan barcodes in NigeriaModern smartphones scan barcodes accurately using their built-in cameras and a software library. Hardware scanners are faster but not necessary for most Nigerian inventory workflows.
All Nigerian products use the same barcode formatNigerian shelves carry products with EAN-13, EAN-8, QR codes, Code 128, and UPC-A formats. Your scanner must support multiple formats to handle mixed stock reliably.
Barcode scanning only works in well-lit environmentsModern ML-based scanning libraries decode barcodes in poor lighting conditions, which is important for Nigerian warehouses that may not have consistent lighting. Test in dim conditions before deployment.
QR codes and barcodes are the same technologyThey are related but different. Barcodes store data in one dimension (lines). QR codes store data in two dimensions (a matrix) and can hold significantly more information, making them better for custom inventory tagging.
Scanning always requires an internet connectionThe camera scan and barcode decoding happen entirely on the device. You only need connectivity when looking up or syncing inventory data with your backend.

Step 1: Choose a Scanning Library for Your Platform

Your choice of scanning library depends on your app's platform. For React Native apps, the two most reliable options in 2026 are expo-barcode-scanner for Expo-managed projects and Vision Camera with the vision-camera-code-scanner plugin for bare React Native. Vision Camera is faster and more accurate on low-end Android devices, which are common among Nigerian warehouse staff, making it the better choice for production inventory apps.

For Flutter apps, use mobile_scanner, which is actively maintained and supports all major barcode formats. For Android-native apps, Google's ML Kit Barcode Scanning API provides fast, on-device decoding with no network requirement and strong performance on mid-range Tecno and Infinix devices common in Nigerian business environments.

Step 2: Request and Handle Camera Permissions

You must request camera permission from the user before activating the scanner. In React Native with Expo, request this on the screen where the scanner appears:

import { Camera } from 'expo-camera';

const [hasPermission, setHasPermission] = useState(null);

useEffect(() => {
  (async () => {
    const { status } = await Camera.requestCameraPermissionsAsync();
    setHasPermission(status === 'granted');
  })();
}, []);

if (hasPermission === null) return <View />;
if (hasPermission === false) return (
  <Text>Camera access is required to scan barcodes. 
  Please enable it in your device settings.</Text>
);

If the user denies permission, show a clear message explaining why camera access is needed and link them to their device settings. Never silently fail on a permission denial, as this leaves users confused about why the scanner is not working.

Step 3: Build the Scanner Component

Create a full-screen scanner view with a visible scanning area indicator. Nigerian users who are new to barcode scanning need visual guidance to align the product barcode with the camera. A translucent overlay with a highlighted scan box in the centre communicates this clearly without instructions.

import { BarCodeScanner } from 'expo-barcode-scanner';

function InventoryScanner({ onScanComplete }) {
  const [scanned, setScanned] = useState(false);

  const handleBarCodeScanned = ({ type, data }) => {
    if (scanned) return;
    setScanned(true);
    onScanComplete({ type, data });
  };

  return (
    <BarCodeScanner
      onBarCodeScanned={handleBarCodeScanned}
      barCodeTypes={[
        BarCodeScanner.Constants.BarCodeType.ean13,
        BarCodeScanner.Constants.BarCodeType.ean8,
        BarCodeScanner.Constants.BarCodeType.qr,
        BarCodeScanner.Constants.BarCodeType.code128,
      ]}
      style={StyleSheet.absoluteFillObject}
    />
  );
}

The scanned flag prevents the same barcode from firing multiple lookup requests while the user holds the phone steady. Reset it after the lookup completes to allow the next scan.

Step 4: Look Up Scanned Codes in Your Inventory Database

When a scan completes, use the barcode value to query your local SQLite database first. If found, display the product details and let the user update quantity. If not found locally, query your remote API if connectivity is available. If still not found, prompt the user to add a new product or flag the item for review.

Design this lookup to complete in under 500 milliseconds on a local query. Nigerian warehouse staff scanning dozens of items in a stocktake session will abandon the app if each scan requires a two-second wait. A local database of your product catalogue makes the scanning workflow fast enough for real production use.

Step 5: Handle Errors and Edge Cases

Common scanning errors include blurry images from camera focus lag, damaged or partially covered barcodes, and barcodes printed at angles or on curved surfaces. Build a manual entry fallback that lets users type a barcode number when the camera cannot decode it. This fallback should be one tap away from the scanner screen, not buried in a menu.

Log failed scan attempts with the barcode image if possible. Reviewing failed scans after deployment tells you which product types or label conditions cause problems in your users' actual environments, and guides decisions about label reprinting or scanner UI adjustments.

Step 6: Integrate Scanning Into Your Inventory Workflow

Barcode scanning is most valuable when it is embedded directly into your key inventory workflows: receiving stock, fulfilling orders, conducting stocktakes, and processing returns. For each workflow, design the scan action to pre-populate the relevant form fields so the user only needs to confirm quantities and tap submit.

For offline environments, queue scan-triggered inventory updates in a local sync queue and process them when connectivity returns, using the conflict resolution approach described in your offline persistence implementation. A scan that updates inventory locally but fails to sync should show the user a pending status rather than silently recording the change as complete.

Frequently Asked Questions

What barcode formats are most common in Nigerian retail and warehousing?
EAN-13 and EAN-8 are the most common formats on consumer goods in Nigeria. QR codes are increasingly used for internal inventory tracking. UPC-A appears on imported US goods. Code 128 is common in logistics and warehousing. Your scanner should support all of these.
Do I need a physical barcode scanner or can I use the phone camera?
Most Nigerian inventory apps use the phone camera for scanning via a software library. This removes the cost of dedicated hardware. For high-volume scanning in a warehouse environment, a Bluetooth barcode scanner paired to a mobile device scans faster and with less battery drain.
Which library should I use for barcode scanning in a React Native inventory app?
Vision Camera with the vision-camera-code-scanner plugin, or expo-camera with Expo Barcode Scanner, are the most maintained options in 2026. ML Kit-based solutions tend to be faster and more accurate on lower-end Android devices common in Nigeria.
How do I handle barcode scanning when the device is offline?
Store the scanned barcode value locally with a timestamp and queue the inventory update for sync when connectivity returns. Use a local product database on the device so the app can look up item details without needing a network call.
What should I do when a barcode scan returns no match in the inventory database?
Show a clear error message identifying the unrecognised barcode value, then give the user the option to manually search, create a new product record, or flag the item for review. Do not silently discard unrecognised scans as they may represent new products that need to be added.

Building an Inventory App for the Nigerian Market?

SucceedHQ Innovations builds custom inventory management solutions tailored to the needs of Nigerian distributors, retailers, and logistics companies.

Discuss Your Project