Round Timer – Boxing & MMA Interval Timer (React Native / Expo source)

A complete, store-ready round timer app for boxing, MMA, Muay Thai and interval training, written in TypeScript with React Native + Expo (SDK 56) and expo-router. One codebase runs on Android, iOS and the web.

The timer is built so the bell keeps ringing on time even when the app is minimized, the screen is locked, or music is playing in another app.


Features

Requirements

Quick start

npm install
npx expo start          # Metro dev server; press w for web

Background bells, custom notification sounds and exact alarms need a development build – they do not work inside Expo Go. Build and run one with:

npx expo run:android    # Android emulator / USB device
npx expo run:ios        # iOS simulator / device (macOS + Xcode)
npx expo start --web    # web version

The android/ and ios/ folders are not shipped; they are generated from app.json by npx expo prebuild (the run: commands do this for you).

Useful scripts

npm run typecheck       # tsc --noEmit
npm test                # engine + stats unit tests
npm run lint            # expo lint
node scripts/gen-sounds.mjs   # regenerate the WAV bells/beeps
node scripts/gen-icons.mjs    # regenerate icon, adaptive icon, splash, favicon

Rebrand guide

What Where
App name app.json → expo.name (also package.json name if you like)
Package id / bundle id app.json → expo.android.package and expo.ios.bundleIdentifier (default com.example.roundtimer – change before publishing, it is permanent on the stores)
URL scheme / slug app.json → expo.scheme, expo.slug
Icon & adaptive icon replace assets/images/icon.png (1024²), android-icon-foreground.png, android-icon-monochrome.png, favicon.png, or edit the SVG in scripts/gen-icons.mjs and run it
Splash screen assets/images/splash-icon.png + expo-splash-screen block in app.json
Notification icon / colour assets/images/notification-icon.png + expo-notifications block in app.json
Colours src/theme.ts (PHASE_COLORS for the full-screen states, colors for UI); background colour also in app.json
Phase labels src/theme.ts → PHASE_LABEL ("FIGHT", "REST" …)
Sounds replace the WAV files in assets/sounds/ (keep the file names, WAV format), or tweak scripts/gen-sounds.mjs
Presets src/storage/presets.ts → BUILT_IN_PRESETS
Combo list src/timer/engine.ts → COMBOS
Studio name + privacy URL src/app/settings.tsx → STUDIO_NAME, PRIVACY_URL; template policy in public/privacy.html

After changing app.json plugins, package id, icons or sounds, regenerate native projects with npx expo prebuild --clean.

Building for Google Play

Option A – EAS Build (cloud, no Android Studio needed)

npm install -g eas-cli
eas login
eas init                                   # links the project to your Expo account
eas build --profile production --platform android   # .aab for Play
eas submit --platform android              # optional upload

Profiles live in eas.json (development, preview APK, production app bundle). For iOS use --platform ios (Apple Developer account required).

Option B – local Gradle build

npx expo prebuild --platform android
cd android
./gradlew bundleRelease      # android/app/build/outputs/bundle/release/app-release.aab

Create your own upload keystore with keytool and configure release signing in android/app/build.gradle (see the React Native "Publishing to Google Play" guide). Never commit the keystore or its passwords. Remember to bump expo.version and expo.android.versionCode for every upload.

Exact-alarm permission (Android)

plugins/withExactAlarms.js adds android.permission.SCHEDULE_EXACT_ALARM to the manifest. It is granted by default on Android 12/13; on Android 14+ new installs start without it, so Setup shows an "Allow exact bells (Alarms & reminders)" button that opens the system switch. Without it, background bells still ring, but the OS may deliver them a little late.

USE_EXACT_ALARM is deliberately not used – Google Play only allows it for alarm-clock and calendar apps. In the Play Console declare the exact-alarm use as a timer that must ring at a precise time. The app also uses POST_NOTIFICATIONS (Android 13+) and WAKE_LOCK.

File structure

app.json                 Expo config (name, ids, icons, plugins, permissions)
eas.json                 EAS build profiles
plugins/withExactAlarms.js   config plugin: SCHEDULE_EXACT_ALARM
src/
  app/                   expo-router screens
    _layout.tsx          stack navigator, dark theme
    index.tsx            timer screen (ring, colours, controls)
    settings.tsx         Setup: presets, rounds, audio & voice, exact-alarm button
    history.tsx          history + stats
  timer/
    engine.ts            pure schedule / state / sound + speech timeline
    useTimer.ts          hook: ticking, audio, notifications, lifecycle, keep-awake
    engine.test.ts       unit tests
  audio/sounds.ts        expo-audio session, mix/duck/solo, volume
  audio/speech.ts        text-to-speech queue (announcements + combos)
  notifications/schedule.ts  background bell scheduling / cancel
  storage/               presets, history (AsyncStorage), stats (+ tests)
  components/            TimeDisplay, ProgressRing, RoundDots, Controls,
                         Stepper, PresetCard, PerRoundEditor, WorkoutComplete
  theme.ts               phase colours, labels, palette
  haptics.ts, format.ts
assets/images/           icon, adaptive icon, splash, favicon, notification icon
assets/sounds/           bell, end_bell, final_bell, warning, beep (WAV)
scripts/                 gen-icons, gen-sounds, gen-store-assets (screenshots)
public/privacy.html      privacy policy template (served by the web build)
documentation/index.html full documentation

Changelog

v1.0.0 – initial release: round/rest/prep timer, warm-up & cool-down, per-round times, 7 presets + custom presets, background bells with exact alarms, mix/duck/solo audio, voice announcements, combo caller, history & streaks, Android/iOS/web.

Support

Questions or problems? Post a comment on the product page of the marketplace where you bought it and I will reply there.