RepoPilot

How do their APIs compare?

About journeyapps/zxing-android-embedded · 2 messages · last activity 8/15/2026

Question

How do their APIs compare?

RepoPilot

I can answer this, but note the two repos serve very different purposes and expose very different kinds of "API" — one is a library with a public integration surface, the other is an end-user Android app whose "API" is mostly internal architecture.

journeyapps/zxing-android-embedded — library-consumer API

This is a purpose-built barcode scanning library, so its public API is designed for external app developers to integrate:

  • Intent-based API: Intents.java defines constants used to build/send Intents to the scanner, such as FORMATS, CAMERA_ID, TORCH_ENABLED, CHARACTER_SET, decode-mode flags like DATA_MATRIX_MODE/AZTEC_MODE/PDF417_MODE [zxing-android-embedded/src/com/google/zxing/client/android/Intents.java:L65-L104]. This is explicitly documented as "effectively API and cannot be changed" [zxing-android-embedded/src/com/google/zxing/client/android/Intents.java:L1-L24].
  • Modern ActivityResult API: ScanContract + ScanOptions, used with registerForActivityResult, replacing the deprecated startActivityForResult/IntentIntegrator pattern [README.md:L124-L160]. ScanOptions exposes configuration setters like setDesiredBarcodeFormats, setPrompt, setCameraId, setBeepEnabled, setBarcodeImageEnabled [README.md:L149-L156].
  • Embeddable view API: DecoratedBarcodeView, a custom View that can be embedded directly in an Activity's layout for advanced UI/logic customization, configured via XML styleable attributes like zxing_scanner_layout and requiring child views zxing_barcode_surface/zxing_viewfinder_view [zxing-android-embedded/src/com/journeyapps/barcodescanner/DecoratedBarcodeView.java:L71-L110].
  • Encoding API: BarcodeEncoder.encodeBitmap(...) for generating barcode bitmaps, with setBackgroundColor/setForegroundColor customization [README.md:L161-L182].

This is a small, stable, well-documented surface aimed at third-party app integration — it's a library API in the traditional sense.

yuliskov/smarttube — internal application architecture, not a public API

SmartTube is an Android TV YouTube client, not a library, so it has no public consumer API. What exists instead are internal service/controller interfaces used within the app:

  • Search abstraction: SearchTagsProvider implemented by MediaServiceSearchTagProvider, which wraps a ContentService and exposes a search(query, callback) method using RxJava (Disposable, .subscribe(...)) [common/.../MediaServiceSearchTagProvider.java:L13-L41].
  • Playback controller pattern: classes like ErrorFixerController and SuggestionsController implement player event/error-handling logic (e.g., getNext()/getPrevious() for queue navigation) [common/.../SuggestionsController.java:L280-L319], reacting to error strings/HTTP response codes from the player pipeline [common/.../ErrorFixerController.java:L142-L181].
  • Domain model methods: Video/Playlist classes expose equals/hashCode/contains-style methods for internal playlist and queue management [common/.../Video.java:L236-L275], [common/.../Playlist.java:L132-L171].
  • It also bundles a third-party UI library (chatkit), which itself defines model interfaces like IUser for consumers of that chat UI component [chatkit/.../IUser.java:L1-L21] — this is the closest thing to a "library API" inside smarttube, but it's vendored, not smarttube's own design.
  • External-facing "APIs" for smarttube are really third-party services it calls (SponsorBlock, DeArrow, Return YouTube Dislike, YouTube/Google OAuth), described in [PRIVACY.md:L20-L26], not APIs it exposes.

Bottom line: zxing-android-embedded has a clean, versioned, documented public API meant for other apps to depend on (Intents, ScanContract/ScanOptions, DecoratedBarcode

Public Q&A. Generated by RepoPilot from the actual source of journeyapps/zxing-android-embedded. AI answers can be incomplete or stale — verify before relying on them.