How do their APIs compare?
How do their APIs compare?
About journeyapps/zxing-android-embedded · 2 messages · last activity 8/15/2026
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.javadefines constants used to build/send Intents to the scanner, such asFORMATS,CAMERA_ID,TORCH_ENABLED,CHARACTER_SET, decode-mode flags likeDATA_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 withregisterForActivityResult, replacing the deprecatedstartActivityForResult/IntentIntegratorpattern [README.md:L124-L160].ScanOptionsexposes configuration setters likesetDesiredBarcodeFormats,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 likezxing_scanner_layoutand requiring child viewszxing_barcode_surface/zxing_viewfinder_view[zxing-android-embedded/src/com/journeyapps/barcodescanner/DecoratedBarcodeView.java:L71-L110]. - Encoding API:
BarcodeEncoder.encodeBitmap(...)for generating barcode bitmaps, withsetBackgroundColor/setForegroundColorcustomization [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:
SearchTagsProviderimplemented byMediaServiceSearchTagProvider, which wraps aContentServiceand exposes asearch(query, callback)method using RxJava (Disposable,.subscribe(...)) [common/.../MediaServiceSearchTagProvider.java:L13-L41]. - Playback controller pattern: classes like
ErrorFixerControllerandSuggestionsControllerimplement 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/Playlistclasses exposeequals/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 likeIUserfor 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
Want to ask your own question?
Open chat for journeyapps/zxing-android-embeddedPublic 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.