Schnappix
Tablet-optimized Android Photobooth app built with React Native and Expo, featuring Kiosk Mode, silent IPP printing, USB cameras, photo frames, and a sticker editor.
Overview
Schnappix is a tablet-optimized Photobooth application built with React Native and Expo (Android package de.orfel.schnappix). It delivers an interactive, offline-first photo-capturing experience for events—complete with countdown, burst mode, generated collages, custom PNG photo frames, a social-media-style sticker editor, silent network printing over IPP, native Android Device Owner Kiosk Mode, external USB camera support, and an on-device Admin Dashboard.
Features
- Photobooth Experience: Intuitive flow from welcome screen to countdown, photo capture, and final preview—with
CameraScreenkept mounted in the background to prevent Android camera hardware crashes. - Multiple Photos & Collages: Capture single shots or multi-photo sequences (up to 4 photos kept for collages) and review/edit them together.
- Sticker & Emoji Editor: Add curated party emojis and dynamic date/time/event stickers that can be dragged, pinched to resize, and rotated with two fingers.
- Photo Frames: Overlay transparent PNG frames (12 built-in designs in
assets/frames/). Admins can set frames to off, always-on, or guest-selectable. - Continuous Shooting (Burst Mode): Automatically capture 1–5 shots in sequence with a configurable interval for collage printing.
- Date/Time & Event Overlay: Optionally stamp the date or date + time and configured event name onto photos with adjustable transform.
- Camera Flash Effect: Full-screen white flash animation on every capture for an authentic photobooth feel.
- Direct Silent Printing (IPP): Built-in Internet Printing Protocol (
ipp-encoder) client sendingimage/jpegprint jobs directly to port631(/ipp/print) with exponential backoff retries (up to 3 attempts), bypassing OS print dialogs. Leaving the printer IP empty enables digital-only mode. - Kiosk Mode (Lock Task Mode): Custom native Android module (
modules/kiosk-mode) and config plugin (plugins/withKioskAdmin) to lock the tablet down to Schnappix without confirmation prompts when configured as Device Owner. - USB & Front Camera Support: Supports internal front/rear cameras as well as external UVC USB cameras via custom native module (
modules/usb-camera) and plugin (plugins/withUsbCamera). - Admin Dashboard: PIN-protected settings screen (
AdminScreen) to configure all parameters on the fly, persisted insettings.json. - Offline Gallery Storage (MediaStore API): Saves originals and final collages directly into structured Android gallery albums (
Schnappix - <EventName> - OriginaleandSchnappix - <EventName> - Collagen).
How It Works & Tech Stack
Tech Stack
| Layer | Technology |
|---|---|
| Framework | React Native (0.81.5) & Expo (SDK 54, New Architecture enabled) |
| Language | TypeScript (^5.3.0) & React (19.1.0) |
| Camera & Media | expo-camera, expo-image, expo-image-manipulator, expo-file-system, expo-media-library |
| Editing & Capture | react-native-view-shot, react-native-gesture-handler, react-native-reanimated, react-native-worklets, expo-linear-gradient |
| Printing | ipp-encoder (^5.0.0) + buffer (raw IPP v1.1 Print-Job over HTTP POST to :631/ipp/print) |
| Icons | @fortawesome/react-native-fontawesome (fa-solid), react-native-svg |
| Native Modules & Plugins | Local Expo modules (kiosk-mode, usb-camera) and config plugins (withKioskAdmin, withUsbCamera, withLocalAars, withRemoveMediaPermissions, withProguardRules, withAndroidSigning, withOptimization, withMmkvForce) |
| Android Target | compileSdkVersion 36, targetSdkVersion 36, ndkVersion 28.0.12932649, landscape orientation |
Design Theme (src/styles/theme.ts)
Schnappix uses a neon synthwave aesthetic matching Icon.png:
- Primary: Electric magenta
#ff2bd6(gradient stops#ff2bd6→#a033ff→#28dfff) - Accent: Cyan blue
#28dfff - Background: Deep navy/black
#050510(surface#0D0D1A, secondary#151528) - Effects: Neon glow shadows and glassmorphism overlays (
rgba(13, 13, 26, 0.85)) - Icons: Font Awesome Solid icons with neon styling
Photo Saving (MediaStore API)
src/services/storage.ts saves images via the native KioskMode.saveImageToAlbum MediaStore helper (Android 10+ RELATIVE_PATH), avoiding legacy storage permission prompts:
- Albums:
Schnappix - <EventName> - Originale(raw shots) andSchnappix - <EventName> - Collagen(final exports) - Filenames:
<SafeEventName>_YYYY-MM-DD_HH-mm-ss_<Raw|Collage>.<ext>
Caution
Do not attempt to force legacy
WRITE_EXTERNAL_STORAGEorREAD_EXTERNAL_STORAGEpermissions on Android 13+;plugins/withRemoveMediaPermissions.jsintentionally strips incompatible media permissions for Play Store and modern Android compliance.
Prerequisites & Installation
Prerequisites
- Node.js (
v18+) andnpm - Expo CLI / EAS CLI (
>= 19.1.0for EAS builds) - Android Studio & Android SDK / NDK (
28.0.12932649) for building the native Android project
Local Setup
-
Clone the repository:
git clone https://git.orfel.de/Jannik/Schnappix.git cd Schnappix -
Install dependencies:
npm install -
Prebuild the native Android project (required due to custom native modules and config plugins):
npx expo prebuild --clean --platform android -
Run the app on an Android device or emulator:
npm run android
Development & Build Rules
Schnappix follows strict versioning and release conventions:
- Versioning: Version format is
23.01.X, whereXmatchesexpo.android.versionCodeinapp.json(currently23.01.78/versionCode: 78). - Build Outputs: Production releases must always be built as both
.apkand.aab, namedSchnappix_v23.01.X.apkandSchnappix_v23.01.X.aab. - Package Name: Must strictly remain
de.orfel.schnappix.
Note
Note on settings persistence (
src/services/settings.ts): WhenApplication.getLastUpdateTimeAsync()detects that the app was updated or freshly installed (orappLastUpdateis missing),loadSettings()resetssettings.jsontoDEFAULT_SETTINGS.
Configuration
Tap the settings icon (⚙️) on the home screen and enter the admin PIN (default: 1234) to open the Admin Dashboard.
Admin Settings Overview (src/services/settings.ts)
| Setting | Internal Key | Description | Default |
|---|---|---|---|
| Drucker IP-Adresse | printerIp |
Local IP of the IPP printer (e.g. Canon Selphy CP1300). Leave empty for digital-only mode | 192.168.0.1 |
| Countdown-Dauer | countdownDuration |
Seconds before photo capture | 3 |
| Admin-Passwort | adminPassword |
PIN to access the Admin Dashboard | 1234 |
| Begrüßungstext | welcomeText |
Welcome headline on the home screen | Zeit für ein Erinnerungsfoto! |
| Footer-Text | footerText |
Footer text on the home screen | Display tippen! • Lächeln! • Foto schnappen! |
| Event-Name | eventText |
Event title for date stickers & album folder names (prompted via modal if empty) | "" (empty) |
| Serienbild-Anzahl | burstCount |
Number of photos per burst (1 = single shot, 2–5 = burst) |
1 |
| Serienbild-Abstand | burstIntervalSec |
Seconds between burst shots | 5 |
| Fotorahmen-Modus | frameMode |
off (Aus) / always (Immer an) / available (Verfügbar) |
available |
| Datum-Einblendung | dateOverlay |
off (Aus) / date (Nur Datum) / datetime (Datum + Uhrzeit) |
off |
| Kiosk-Modus | kioskModeEnabled |
Locks the tablet to Schnappix (auto-starts on launch if enabled) | false (Aus) |
| Frontkamera nutzen | useFrontCamera |
Toggles between front camera and rear/USB camera | true (An) |
| Logs aktivieren | enableLogs |
Enables detailed in-app file logging | true (An) |
Kiosk Mode (Android Device Owner) Setup
To use true Kiosk Mode (Lock Task Mode) without system confirmation prompts and without external MDM software, Schnappix must be registered as the Android Device Owner:
Prerequisites:
- The Android tablet must have no accounts (such as a Google Account) configured—ideally start from a factory-reset device.
- Enable Developer Options and USB Debugging on the tablet.
- Install the Schnappix APK on the tablet.
Setup Command:
adb shell dpm set-device-owner de.orfel.schnappix/expo.modules.kioskmode.AdminReceiver
Expected confirmation:
Success: Device owner set to package de.orfel.schnappix
You can now disconnect USB and toggle Kiosk-Modus in the Admin Dashboard.
Warning
Once set as Device Owner, Android prevents normal uninstallation of Schnappix. You must either factory-reset the device or remove Device Owner status programmatically.
Photo Frames — Setup Guide (src/data/frames.ts)
Custom photo frames are transparent PNG overlays rendered on top of captured photos before saving or printing.
| Property | Requirement |
|---|---|
| Format | PNG with alpha channel (transparency) |
| Resolution | 1500 × 1000 px (3:2 landscape ratio, matching tablet display and print output) |
| Transparency | The photo area must be fully transparent (alpha = 0) |
| File size | Keep each file under 500 KB for fast rendering |
| Naming | frame_<name>.png (e.g. frame_balloons.png) |
Adding a new frame:
- Place the PNG file into
assets/frames/. - Register it in
src/data/frames.ts:export const FRAMES: FrameDefinition[] = [ { id: 'balloons', name: 'Luftballons', asset: require('../../assets/frames/frame_balloons.png') }, ]; - Rebuild the Android app (
npx expo prebuild --clean --platform androidandnpm run android). - Select the frame mode (
alwaysoravailable) in the Admin Dashboard.
Usage
Guest Photobooth Flow
- Welcome Screen: Guest taps the screen to start (if
Event-Nameis empty, the Admin modal prompts for an event name first). - Capture: Countdown runs (
countdownDuration), white screen flash fires, and either a single shot or burst sequence (1–5photos) is captured. - Preview & Sticker Editor:
- Tap Sticker to open
StickerTrayand add curated party emojis. - Drag stickers anywhere, pinch to resize, and use two fingers to rotate (
DraggableSticker). - Tap a sticker to select it and press
×to delete it. - Dynamic date, time, and event-name stickers render automatically according to Admin settings.
- Choose a photo frame via
FramePicker(whenframeModeisavailable) or add more photos to build a collage. - Save directly to the device gallery (
MediaStore) and print silently via IPP.
- Tap Sticker to open
Useful npm Scripts
npm start— Start Expo dev servernpm run android— Build and run native Android app (expo run:android)npm run ios— Run iOS build (expo run:ios)npm run web— Run web preview (expo start --web)
Project Structure
Schnappix/
├── assets/
│ ├── frames/ # 12 built-in transparent PNG photo frames (1500×1000)
│ └── graphics/ # Store & sample promotional graphics
├── modules/
│ ├── kiosk-mode/ # Native Android Lock Task + MediaStore saving module
│ └── usb-camera/ # Native Android UVC USB camera module & AARs
├── plugins/ # Expo config plugins (kiosk, USB, AARs, signing, ProGuard, etc.)
├── src/
│ ├── components/ # DraggableSticker, FrameOverlay, FramePicker, GradientButton, Icon, StickerTray
│ ├── data/
│ │ └── frames.ts # Built-in photo frame registry
│ ├── screens/
│ │ ├── CameraScreen.tsx # Welcome overlay, countdown, flash, camera/USB capture
│ │ ├── PreviewScreen.tsx # Collage view, frame picker, sticker editor, print & save
│ │ └── AdminScreen.tsx # PIN-protected configuration dashboard
│ ├── services/
│ │ ├── logger.ts # Persistent file logger
│ │ ├── printer.ts # Silent IPP v1.1 JPEG network printing
│ │ ├── settings.ts # settings.json persistence & update-reset logic
│ │ └── storage.ts # Android MediaStore album saving
│ ├── styles/
│ │ └── theme.ts # Neon synthwave colors, spacing & gradients
│ └── types/
│ └── ipp-encoder.d.ts # TypeScript declarations for ipp-encoder
├── App.tsx # Root state machine & persistent CameraScreen host
├── app.json # Expo configuration (version 23.01.78, de.orfel.schnappix)
├── eas.json # EAS Build profiles (development, preview APK, production)
├── Icon.png # App icon
├── package.json # Dependencies and scripts
└── withAndroidSigning.js # Android release keystore signing plugin
License
Licensed under the MIT License — see LICENSE for details.