diff --git a/README.md b/README.md index c797737..55803eb 100644 --- a/README.md +++ b/README.md @@ -28,9 +28,11 @@ npm run dev Open the local web address shown by Vite. Choose a dance template or add a sound, then press **Play**. Your browser may ask to allow audio. +To run the app on an Android phone with live reload, connect the phone with USB debugging enabled and put it on the same Wi-Fi network as your computer. Start Vite with `npm run dev`, then run `npm run dev:android` in a second terminal. Capacitor installs and opens the app on the phone; code changes reload while the dev server is running. Stop the native run with **Ctrl+C**. + ## Mobile downloads -- [Android / e/OS debug APK 0.1.1](downloads/BeatHound-Android-eOS-0.1.1-debug.apk) — installable on Android API 24 or newer and intended for compatible e/OS 4+ devices. +- [Android / e/OS debug APK 0.1.2](downloads/BeatHound-Android-eOS-0.1.2-debug.apk) — installable on Android API 24 or newer and intended for compatible e/OS 4+ devices. The generated Android file is a debug-signed build for testing. It is not a Google Play release package. No iOS app or download is currently supported because of financial constraints. @@ -42,7 +44,7 @@ The mobile prototype uses Capacitor for Android. npm run android:debug ``` -The Android build needs JDK 21 and Android SDK Platform 36 / Build Tools 36.0.0. It writes the Gradle output and copies the APK to `downloads/BeatHound-Android-eOS-0.1.1-debug.apk`. iOS is currently unsupported for financial reasons; see the [native build guide](docs/native-builds.md). +The Android build needs JDK 21 and Android SDK Platform 36 / Build Tools 36.0.0. It writes the Gradle output and copies the APK to `downloads/BeatHound-Android-eOS-0.1.2-debug.apk`. iOS is currently unsupported for financial reasons; see the [native build guide](docs/native-builds.md). ## Project checks diff --git a/android/app/build.gradle b/android/app/build.gradle index 47fb0f7..38508b8 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId "com.ninosaurier.beathound" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 6 - versionName "0.1.1" + versionCode 7 + versionName "0.1.2" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" aaptOptions { // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps. diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 79881d6..b06ddbf 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -15,7 +15,6 @@ android:label="@string/title_activity_main" android:theme="@style/AppTheme.NoActionBarLaunch" android:launchMode="singleTask" - android:windowSoftInputMode="adjustResize" android:exported="true"> diff --git a/android/app/src/main/java/com/ninosaurier/beathound/MainActivity.java b/android/app/src/main/java/com/ninosaurier/beathound/MainActivity.java index b2f9131..b0fccf6 100644 --- a/android/app/src/main/java/com/ninosaurier/beathound/MainActivity.java +++ b/android/app/src/main/java/com/ninosaurier/beathound/MainActivity.java @@ -1,19 +1,5 @@ package com.ninosaurier.beathound; -import android.os.Bundle; -import android.view.Window; -import android.view.WindowManager; import com.getcapacitor.BridgeActivity; -public class MainActivity extends BridgeActivity { - - @Override - protected void onCreate(Bundle savedInstanceState) { - requestWindowFeature(Window.FEATURE_NO_TITLE); - super.onCreate(savedInstanceState); - getWindow().setFlags( - WindowManager.LayoutParams.FLAG_FULLSCREEN, - WindowManager.LayoutParams.FLAG_FULLSCREEN - ); - } -} +public class MainActivity extends BridgeActivity {} diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png index 9150eda..c023e50 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png index 5c70cd6..2127973 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png index 8c299ac..b441f37 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png index 2675113..72905b8 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png index 1020f05..8ed0605 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png index 9bfa2b4..9502e47 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png index bbab236..4d1e077 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png index 79e80dd..df0f158 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png index 6770657..853db04 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index e87aee1..6cdf97c 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png index 1bcd4a0..2960cbb 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png index f60a4fb..8e3093a 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index b25627d..46de6e2 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png index f612b1d..d2ea9ab 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png index b6b83a7..a40d73e 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/values/ic_launcher_background.xml b/android/app/src/main/res/values/ic_launcher_background.xml index c3f3c85..c5d5899 100644 --- a/android/app/src/main/res/values/ic_launcher_background.xml +++ b/android/app/src/main/res/values/ic_launcher_background.xml @@ -1,4 +1,4 @@ - #24215E - + #FFFFFF + \ No newline at end of file diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml index bb92269..be874e5 100644 --- a/android/app/src/main/res/values/styles.xml +++ b/android/app/src/main/res/values/styles.xml @@ -12,13 +12,11 @@ - + \ No newline at end of file diff --git a/docs/native-builds.md b/docs/native-builds.md index 892f54b..f3b6d7d 100644 --- a/docs/native-builds.md +++ b/docs/native-builds.md @@ -21,16 +21,16 @@ Gradle creates the debug APK here: android/app/build/outputs/apk/debug/app-debug.apk ``` -After a successful build, `downloads/BeatHound-Android-eOS-0.1.1-debug.apk` is debug-signed and available for direct testing and sideloading, not for Google Play publication. A release build should use a private signing key that is not stored in Git. +After a successful build, `downloads/BeatHound-Android-eOS-0.1.2-debug.apk` is debug-signed and available for direct testing and sideloading, not for Google Play publication. A release build should use a private signing key that is not stored in Git. -`npm run android:debug` also copies each new debug build to `downloads/BeatHound-Android-eOS-0.1.1-debug.apk`. +`npm run android:debug` also copies each new debug build to `downloads/BeatHound-Android-eOS-0.1.2-debug.apk`. ### Install with ADB With USB debugging enabled on an Android or e/OS device, install the APK with: ```sh -adb install downloads/BeatHound-Android-eOS-0.1.1-debug.apk +adb install downloads/BeatHound-Android-eOS-0.1.2-debug.apk ``` You can also transfer the APK to the device and open it. The device may ask you to allow installation from that file source. diff --git a/docs/software-guide.md b/docs/software-guide.md index 9952b02..959e8e6 100644 --- a/docs/software-guide.md +++ b/docs/software-guide.md @@ -86,6 +86,22 @@ npm run dev Vite prints a local web address. Open that address in your browser. The dev server listens on all network interfaces, so it may also be reachable from another device on your local network. +### Run on an Android phone with live reload + +Connect the Android phone to the computer with USB debugging enabled, and make sure both devices are on the same Wi-Fi network. In the project folder, start the Vite server in one terminal: + +```sh +npm run dev +``` + +In a second terminal, install and launch the app on the connected phone: + +```sh +npm run dev:android +``` + +The native app loads from the Vite server, so code changes appear without rebuilding the app. Keep both terminals running and press **Ctrl+C** in the second terminal to stop live reload. + ### Checks and production build ```sh diff --git a/downloads/BeatHound-Android-eOS-0.1.1-debug.apk b/downloads/BeatHound-Android-eOS-0.1.2-debug.apk similarity index 86% rename from downloads/BeatHound-Android-eOS-0.1.1-debug.apk rename to downloads/BeatHound-Android-eOS-0.1.2-debug.apk index abc0672..b7f15d8 100644 Binary files a/downloads/BeatHound-Android-eOS-0.1.1-debug.apk and b/downloads/BeatHound-Android-eOS-0.1.2-debug.apk differ diff --git a/ionic.config.json b/ionic.config.json new file mode 100644 index 0000000..fed9cc4 --- /dev/null +++ b/ionic.config.json @@ -0,0 +1,7 @@ +{ + "name": "BeatHound", + "integrations": { + "capacitor": {} + }, + "type": "react" +} diff --git a/package-lock.json b/package-lock.json index 7809aa9..037e7bc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "beat-hound", - "version": "0.1.1", + "version": "0.1.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "beat-hound", - "version": "0.1.1", + "version": "0.1.2", "dependencies": { - "@capacitor/android": "^8.6.2", - "@capacitor/core": "^8.6.2", + "@capacitor/android": "^8.6.3", + "@capacitor/core": "8.6.3", "@capacitor/ios": "^8.6.2", "@ionic/react": "^8.7.6", "ionicons": "^7.4.0", @@ -17,7 +17,7 @@ "react-dom": "^19.1.1" }, "devDependencies": { - "@capacitor/cli": "^8.6.2", + "@capacitor/cli": "8.6.3", "@eslint/js": "^9.35.0", "@types/react": "^19.1.10", "@types/react-dom": "^19.1.7", @@ -536,18 +536,18 @@ } }, "node_modules/@capacitor/android": { - "version": "8.6.2", - "resolved": "https://registry.npmjs.org/@capacitor/android/-/android-8.6.2.tgz", - "integrity": "sha512-dWXnXmOVTtxU91n5h11MzoQ7PAMjyzU1qguw0mBJZiwSuhGvLKTG/IlsQ75H8qeE0a1acV2f573x15wYvyzuVA==", + "version": "8.6.3", + "resolved": "https://registry.npmjs.org/@capacitor/android/-/android-8.6.3.tgz", + "integrity": "sha512-hTRLGYBUr7UoFSvn+1dnTwgPV7q0FgcTAVA6Y2i0wYzEkq3vR3oSaIs6ERO8WiqeIAupbbL74iG3OwM7BA1bcQ==", "license": "MIT", "peerDependencies": { "@capacitor/core": "^8.6.0" } }, "node_modules/@capacitor/cli": { - "version": "8.6.2", - "resolved": "https://registry.npmjs.org/@capacitor/cli/-/cli-8.6.2.tgz", - "integrity": "sha512-3HeNPX3cEWBSljJT0sJviZCxXRoToTLAufhUcIJh+JMj1xOhLFZpuj8oFRnJ0kNYAf7DIBHQDmilIXloK9+YYg==", + "version": "8.6.3", + "resolved": "https://registry.npmjs.org/@capacitor/cli/-/cli-8.6.3.tgz", + "integrity": "sha512-HBZ5mb9CNv5TzEW+vjB3aWKi7JIZRb7ExxsVaH/OLd19qXlarWxc2vUXAKtM6Zl2LmTb/rX8hN1q1BvwO7gb7w==", "dev": true, "license": "MIT", "dependencies": { @@ -592,9 +592,9 @@ } }, "node_modules/@capacitor/core": { - "version": "8.6.2", - "resolved": "https://registry.npmjs.org/@capacitor/core/-/core-8.6.2.tgz", - "integrity": "sha512-UEb9crRuqEAe2Iu2eGOEuQ8rLQxpwg7ZZIpl17UJoytEpnV1e4oXXW0K7yYS2NsCOGmJjyLeKjNlgG7tkAoX8g==", + "version": "8.6.3", + "resolved": "https://registry.npmjs.org/@capacitor/core/-/core-8.6.3.tgz", + "integrity": "sha512-WJ/DM2OTriEED5sI4jUyJU0NL3QJ/YenS2+SepW/nghMA5ixFJhm8NqGWdqDYYg+eRtJkjD8PcXtIxy4zTP0PA==", "license": "MIT", "dependencies": { "tslib": "^2.1.0" diff --git a/package.json b/package.json index 03a62ec..d320e41 100644 --- a/package.json +++ b/package.json @@ -1,25 +1,26 @@ { "name": "beat-hound", "private": true, - "version": "0.1.1", + "version": "0.1.2", "type": "module", "scripts": { - "dev": "vite --host 0.0.0.0", + "dev": "vite --host 0.0.0.0 --port 5173 --strictPort", + "dev:android": "cap run android --live-reload --port 5173", "build": "tsc --noEmit && vite build", "build:mobile": "tsc --noEmit && vite build --base=./", "docs:dev": "vitepress dev docs --host 0.0.0.0", "docs:build": "vitepress build docs", "docs:preview": "vitepress preview docs --host 0.0.0.0", "cap:sync": "npm run build:mobile && cap sync", - "android:debug": "npm run build:mobile && cap sync android && cd android && ./gradlew assembleDebug && cd .. && mkdir -p downloads && cp android/app/build/outputs/apk/debug/app-debug.apk downloads/BeatHound-Android-eOS-0.1.1-debug.apk", + "android:debug": "npm run build:mobile && cap sync android && cd android && ./gradlew assembleDebug && cd .. && mkdir -p downloads && cp android/app/build/outputs/apk/debug/app-debug.apk downloads/BeatHound-Android-eOS-0.1.2-debug.apk", "ios:sync": "npm run build:mobile && cap sync ios", "ios:open": "cap open ios", "test": "vitest run", "lint": "eslint ." }, "dependencies": { - "@capacitor/android": "^8.6.2", - "@capacitor/core": "^8.6.2", + "@capacitor/android": "^8.6.3", + "@capacitor/core": "8.6.3", "@capacitor/ios": "^8.6.2", "@ionic/react": "^8.7.6", "ionicons": "^7.4.0", @@ -27,7 +28,7 @@ "react-dom": "^19.1.1" }, "devDependencies": { - "@capacitor/cli": "^8.6.2", + "@capacitor/cli": "8.6.3", "@eslint/js": "^9.35.0", "@types/react": "^19.1.10", "@types/react-dom": "^19.1.7", diff --git a/src/components/BeatLoopPanel.tsx b/src/components/BeatLoopPanel.tsx index d0713df..5912284 100644 --- a/src/components/BeatLoopPanel.tsx +++ b/src/components/BeatLoopPanel.tsx @@ -2,7 +2,6 @@ import { useMemo } from 'react'; import { IonButton, IonIcon } from '@ionic/react'; import { trash } from 'ionicons/icons'; import { BeatSelectionHint } from './BeatSelectionHint'; -import { SampleLegend } from './CategoryLegend'; import { CircularTimeline } from './CircularTimeline'; import { PitchControl } from './PitchControl'; import { SoundRingSelector } from './SoundRingSelector'; @@ -104,11 +103,6 @@ export function BeatLoopPanel({ sequencer, soundPalette }: BeatLoopPanelProps) { onChangePitch={sequencer.changeBeatPitch} /> - - ); } diff --git a/src/components/CircularTimeline.tsx b/src/components/CircularTimeline.tsx index 6616f9d..92c2c46 100644 --- a/src/components/CircularTimeline.tsx +++ b/src/components/CircularTimeline.tsx @@ -214,7 +214,7 @@ export function CircularTimeline({ onFocus={() => onSelectBeat(beat.id)} > - +
- Pitch + Pitch {selectedBeat.letter} {getPitchLabel(pitchSemitones, instrument.pitchBaseMidi)} diff --git a/src/styles.css b/src/styles.css index 368dcb6..215415b 100644 --- a/src/styles.css +++ b/src/styles.css @@ -638,7 +638,7 @@ ion-content.app-content-studio { .sound-point-letter { fill: var(--base); - font: 700 9px var(--mono); + font: 700 11px var(--mono); pointer-events: none; text-transform: lowercase; } @@ -715,8 +715,7 @@ ion-content.app-content-studio { font-size: 28px; } -.hint-swatch, -.legend-swatch { +.hint-swatch { flex: 0 0 auto; border-radius: 50%; } @@ -735,24 +734,6 @@ ion-content.app-content-studio { color: #7671a7; } -.sound-legend { - display: flex; - flex-wrap: wrap; - justify-content: center; - align-items: center; - gap: 8px 14px; - padding-top: 17px; -} - -.legend-sample { - display: inline-flex; - align-items: center; - gap: 6px; - color: var(--soft); - font-size: 10px; - white-space: nowrap; -} - .category-letter-badge { display: inline-flex; width: 17px; @@ -766,16 +747,6 @@ ion-content.app-content-studio { font: 600 9px var(--mono); } -.legend-swatch { - width: 7px; - height: 7px; -} - -.legend-empty { - color: var(--soft); - font-size: 11px; -} - .audio-error { margin: 13px auto 0; color: #ffad8b; @@ -1024,7 +995,7 @@ ion-content.instrument-picker-content { --bar-background-active: var(--accent); --bar-height: 3px; --height: 28px; - --knob-background: var(--accent); + --knob-background: #fff; --knob-size: 12px; --padding-top: 2px; --padding-bottom: 2px; @@ -1392,10 +1363,6 @@ ion-content.instrument-picker-content { width: min(100%, max(180px, calc(100dvh - 390px))); } - .sound-legend { - gap: 6px 10px; - padding-top: 8px; - } } @media (max-width: 360px) {