The app lives in the mobile/ folder. It is one Flutter project that builds both the Android app and the iPhone app.
It reads everything from your website — name, logo, colours, tabs, stations, the song on air, ads, VIP plans and push settings — so you set it up once
and then run it from Admin → Mobile App.





What the app does
- First launch: the listener picks a language (English, தமிழ், සිංහල, हिन्दी, Español, Français) and the country to open first. Switch it off under Admin → Mobile App → Behaviour.
- Home: a 3D carousel of country flags, the country's languages as chips, and its stations. Browse: tabs from your categories (or genres, languages, countries), search, featured and popular strips, and a filter sheet with genres, languages, tags, sorting and the list / grid / classic view.
- Player: the station logo inside a ring that pulses with the sound, a LIVE badge, the song on air (scrolling when long), a wave or dots visualizer, previous / next, sleep timer with fade-out, volume, the song's history and a “find this song” button.
- Beat colours: while music plays the app's colours shift and pulse on every beat. On Android the visualizer reads the app's own sound and detects real beats; on iPhone (where Apple does not let apps read a live stream's sound) a steady musical pulse at the station's tempo is used. Listeners can switch beat colours off and set how strong they are.
- Equalizer (Android): on/off, five bands, presets (some of them tint the app), bass boost, 3D surround, volume boost and “normalize volume”.
- Record: saves the show to the phone (Settings → Recordings: play, share, delete). Choose who may record: everyone, VIP listeners only, or nobody.
- Background playback with lock-screen and notification controls, headphone and car buttons; the song on air appears on the lock screen.
- Favourites and recently played, report a broken station, share a station, dark and light mode, and every colour theme of your website (a theme added under Admin → Theme & Settings appears in the app too).
- Languages: the same languages as the website's language menu, chosen under Admin → Theme & Settings. A language added there is downloaded by the app with its texts; one switched off disappears.
- Settings → About shows Connected to: the website the app reads everything from. Your VIP plans, languages and ads are taken from that site's admin panel.
- The back button on the home screen asks first: keep playing in the background, stop and close, or stay.
- VIP through Google Play and the App Store (see VIP subscriptions), AdMob ads with the EU consent form, and programme alerts through OneSignal or Firebase.
1 · Point the app at your site
Open mobile/lib/core/site.dart and put your address in kSiteUrl (keep the trailing slash) — or leave the file alone and pass it when building:
flutter build appbundle --release --dart-define=SITE_URL=https://yourdomain.com/
Check first: https://yourdomain.com/api/app.php?action=config must answer with {"ok":true,….
2 · Build it on your computer
What you need
- Flutter (stable, 3.44 or newer) — docs.flutter.dev/get-started/install. Run
flutter doctor: it tells you what else is missing. - Android Studio (it brings the Android SDK and Java) for Android. For iPhone: a Mac with Xcode.
Open the project
- Unzip the package and open the
mobilefolder in Android Studio (File → Open), or in a terminal go into it:cd mobile. - Run
flutter pub getonce. - Connect a phone (USB debugging on) and run
flutter runto try the app.
Make it yours (before the first upload)
- Your site address in
mobile/lib/core/site.dart(see step 1). - Package name:
applicationIdinmobile/android/app/build.gradle.kts, e.g.com.yourdomain.radio. It can never change after the first Google Play upload. - App name, icon: see “Make it yours” below.
- AdMob app id (only if you show ads): add this line to
mobile/android/gradle.properties— the same id you enter under Admin → Mobile App → Ads:ADMOB_APP_ID=ca-app-pub-1234567890123456~1234567890
Create your upload key (once)
Google Play only accepts an app signed with your own key. In the mobile folder:
keytool -genkey -v -keystore android/app/upload.jks -keyalg RSA -keysize 2048 -validity 10000 -alias upload
Then create the file mobile/android/key.properties:
storeFile=upload.jks storePassword=YOUR_KEYSTORE_PASSWORD keyAlias=upload keyPassword=YOUR_KEY_PASSWORD
upload.jks and its passwords safe and backed up — every future update must be signed with the same key.Build the bundle for Google Play (.aab)
flutter build appbundle --release
The file is mobile/build/app/outputs/bundle/release/app-release.aab — upload it in the Play Console. In Android Studio the same is Build → Flutter → Build App Bundle.
Build an APK to install on a phone
flutter build apk --release --split-per-abi
The files are in mobile/build/app/outputs/flutter-apk/: app-arm64-v8a-release.apk for 64-bit phones (nearly every phone since 2017) and app-armeabi-v7a-release.apk for older 32-bit ones.
Why one APK per phone type? A single APK holds the app once for every kind of phone processor, with the ads, Firebase and OneSignal libraries for each — over 60 MB, while a phone only uses one part. One APK per phone type is about a third of that, and Google Play does the same automatically from the .aab bundle, so listeners download roughly 15–20 MB from the store. VIP can only be bought in the copy installed from Google Play.
iPhone
On a Mac: put your AdMob iOS app id in mobile/ios/Flutter/AppConfig.xcconfig, open mobile/ios/Runner.xcworkspace in Xcode, choose your team and bundle ID under Signing & Capabilities, then run flutter build ipa --release and upload the result with Xcode's Organizer or Transporter.
3 · Make it yours
| Package / bundle ID | Android: applicationId in mobile/android/app/build.gradle.kts (can never change after the first Play upload). iPhone: open mobile/ios/Runner.xcworkspace in Xcode → Runner → Signing & Capabilities → Bundle Identifier, and choose your team. |
|---|---|
| Name under the icon | Android: mobile/android/app/src/main/res/values/strings.xml. iPhone: CFBundleDisplayName in mobile/ios/Runner/Info.plist. The name inside the app comes from the admin panel. |
| Icon and splash | Android: the mipmap-* folders in mobile/android/app/src/main/res. iPhone: Assets.xcassets/AppIcon and LaunchImage. A tool such as flutter_launcher_icons makes all sizes from one 1024 px picture. |
| AdMob app id | Android: the ADMOB_APP_ID variable (or gradle property). iPhone: mobile/ios/Flutter/AppConfig.xcconfig. The ad units are set in Admin → Mobile App → Ads (separately for Android and iPhone). Google's test ids are filled in until you change them. |
| Release signing (Android) | Create an upload key (keytool -genkey -v -keystore upload.jks -keyalg RSA -keysize 2048 -validity 10000 -alias upload), put it in mobile/android/app/ and create mobile/android/key.properties with storeFile=upload.jks, storePassword=…, keyAlias=upload, keyPassword=…. Never commit these two files. |
4 · Publish
Google Play
- Upload the
.aabto a testing track, fill in the listing, the privacy policy (your site has one at/page/privacy-policy) and the data-safety form. - Declare the media playback foreground service (the app plays in the background).
- The app asks for “record audio” only when the listener allows the visualizer to follow the music: Android uses that permission for its Visualizer, which here reads the app's own sound — the microphone is never used. Say so in the privacy policy and the data-safety form (no audio is collected).
App Store
- In Xcode: choose your team, set the bundle ID, then Product → Archive and upload — or
flutter build ipaand upload with Transporter. - The app uses the audio background mode (radio keeps playing with the screen off) — mention it in the review notes.
- For programme alerts on iPhone, switch on the Push Notifications capability in Xcode and upload an APNs key to OneSignal or Firebase.
5 · Settings in the admin panel
| Look | App name, tagline, logo, splash logo and colour, store links, privacy-policy link, station list style, visualizer style and beat colours for new listeners. |
|---|---|
| Behaviour | Tabs source, open on favourites, dark by default, open the full player on tap, autoplay, high quality, auto reconnect, first-launch questions, the country shown first, who may record. |
| Ads | AdMob units for Android and iPhone, how often a full-screen ad shows and how often an ad appears in lists. VIP listeners never see ads, and a “Remove ads” link over the banner opens VIP. Show test ads fills every ad place with Google's sample ads, to check them before your own units are live. The page also shows which version of the app last opened and which AdMob app id is inside it, so a build with the wrong id is spotted at once. Put the same AdMob app id into the app before building it (see step 2). |
| Subscriptions | VIP products and checking purchases with Google and Apple — see VIP subscriptions. |
| Notifications | OneSignal app id, or Firebase project values and topic. No file has to be built into the app: the app saves the Firebase values from your site and starts Firebase with them, so alerts arrive even when the app is closed. |
The song on air in the app follows Admin → Now Playing (on/off, how often, how many past songs, lock screen, artwork).
For developers
flutter analyzeandflutter test(16 tests: parsing, filters, equalizer mapping, the beat engine, translations, and every screen in several languages).- Texts are in
lib/core/i18n_strings.dart— add a language by adding a block there and to the list inlib/ui/sheets.dart. tool/screenshots/shots_test.dartdraws the app's screens to PNG files for store listings.
