This is the official Intergalactic FM mobile application, built with Apache Cordova.
The app is a hybrid webapp: the main logic runs inside a 'WebView', with native plugins (Android/iOS) for background music playback, media notifications, and system integration.
Cordova allows you to package a web application (HTML, CSS, JavaScript) as a native app for Android and iOS.
Build process overview:
- The webapp ('/www') is copied into the native project.
- Cordova embeds a 'WebView' to load the '/www' content.
- Plugins provide JavaScript → native bridges (e.g., audio playback, notifications).
- A Gradle project is generated for Android, and an Xcode project for iOS.
- From there you can build an APK/AAB (Android) or IPA (iOS).
- Cordova wrapper around a web app
- Custom MusicPlaybackService for Android
- Media metadata updates (title, artist, album, cover art)
- Foreground service with proper lockscreen integration
- Ready for release on Google Play Store and Apple App Store
- Node.js (>= 16.x recommended)
- npm (>= 8.x)
- Cordova CLI ('npm install -g cordova')
- Android Studio (for Android builds)
- Xcode with CocoaPods (for iOS builds, macOS only)
- git clone https://github.com/intergalacticfm/mobile.app.intergalacticfm
- cd mobile.app.intergalacticfm
npm install
- cordova platform add android
- cordova platform add ios
cordova plugin add ./cordova-plugin-foreground-play
- cordova prepare androir
- cordova build android
This:
- Copies your web app from 'www/' into 'platforms/android/app/src/main/assets/www/'
- Compiles Java sources (including 'MusicService' and 'MusicPlaybackService')
- cordova prepare ios
- cordova build ios
This:
- Copies your web app into the iOS project structure
- Integrates plugins and Objective-C/Swift code
- Produces an '.xcworkspace' file you can open in Xcode to build/run
- Install Android Studio.
- Ensure Android SDK Platform and Build Tools are installed.
- Configure 'JAVA_HOME' and 'ANDROID_HOME' environment variables.
- Connect a device or start an emulator: cordova run android
- Install Xcode.
- Install CocoaPods: brew install cocoapods
- Open the generated project: open platforms/ios/YourApp.xcworkspace
- Build & run from Xcode.
The Android app integrates a MusicPlaybackService via a Cordova plugin.
-
'MusicService.java': Cordova entry point that receives JS calls and starts/stops the service.
-
'MusicPlaybackService.java': Foreground service managing media metadata, notifications, and lockscreen integration.
-
Metadata is updated by calling from JavaScript:
-
cordova.plugins.MusicService.start();
-
cordova.plugins.MusicService.updateMetadata("Song Title", "Artist", "Album", "cover.png");
-
cordova.plugins.MusicService.setPlaying(true);
Assets for background metadata cover are retrieved from local, not from the web.