WorldRadios documentation

Laravel radio directory · Now Playing · Android & iPhone app · VIP subscriptions

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.

Home — countries in 3D
Player — moves with the music
Browse, filters, featured
Equalizer (Android)
Six languages

What the app does

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

Open the project

  1. Unzip the package and open the mobile folder in Android Studio (File → Open), or in a terminal go into it: cd mobile.
  2. Run flutter pub get once.
  3. Connect a phone (USB debugging on) and run flutter run to try the app.

Make it yours (before the first upload)

  1. Your site address in mobile/lib/core/site.dart (see step 1).
  2. Package name: applicationId in mobile/android/app/build.gradle.kts, e.g. com.yourdomain.radio. It can never change after the first Google Play upload.
  3. App name, icon: see “Make it yours” below.
  4. 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
Keep 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 IDAndroid: 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 iconAndroid: 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 splashAndroid: 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 idAndroid: 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

  1. Upload the .aab to a testing track, fill in the listing, the privacy policy (your site has one at /page/privacy-policy) and the data-safety form.
  2. Declare the media playback foreground service (the app plays in the background).
  3. 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

  1. In Xcode: choose your team, set the bundle ID, then Product → Archive and upload — or flutter build ipa and upload with Transporter.
  2. The app uses the audio background mode (radio keeps playing with the screen off) — mention it in the review notes.
  3. 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

LookApp name, tagline, logo, splash logo and colour, store links, privacy-policy link, station list style, visualizer style and beat colours for new listeners.
BehaviourTabs 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.
AdsAdMob 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).
SubscriptionsVIP products and checking purchases with Google and Apple — see VIP subscriptions.
NotificationsOneSignal 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