Simple web radio player for my elderly mother, no ads, no popups, no settings.
My primary target is a rooted Nexus 7 (android 5.1.1, XenonHD), if you need support for other devices, feel free to PR.
The APK has not been uploaded to the play store, I use "unknown sources" and manual installs, the device has no gapps installed as a matter of fact.
npm i
sudo npm install -g cordova
cordova requirements
- follow cordova instructions! (install java jdk, android sdk, gradle, etc.)
npm run dev
starts a webpack servernpm run preview:browser
builds a js pack, starts koa static, opens browser- check .env.sample for env vars
For android enable "usb debugging" and "unknown sources".
Run npm run preview:android
to upload the app directly to the device.
If you want to upload the apk manually, then disable the "usb debugging" mode.
- First build the apk:
npm run build:android
, this will create an unsigned apk in dist. - Symlink or copy your release-key.keystore into the config folder. Create a key
with
keytool -genkey -v -keystore ./config/release-key.keystore -alias alias_name -keyalg RSA -validity 10000
if you don't have one so far. - Run
npm run release:android
, if you have the keystore file in place, jdk properly installed - this should create a signed binary in the dist folder. - So far the release drafting has to be done manually on github. Do not forget to upload the signed apk as a binary release.
Build and release together (assuming everything is set up correctly):
npm run build:android && npm run release:android
Station list is stored in a json config file (station.json), right now the application itself does not fetch/parse remote sites (the list is compiled into the app itself; downloading a station list json from arbitrary url is possible).
Object format:
- name: name of the radio channel
- url: homepage
- locator: either a suffix to search for in the homepage or an url and a suffix in "url->suffix" format. Use with pls or m3u files, think of it as an extra step.
- src: the stream url, audio source
- shoutcastify: shoutcast streams must end with a semicolon, but sometimes it is missing from the source (probably appended by an interim flash player)
- (timestamp): Date.now generated by test-stations, not required
- (broken): generated by test-stations, indicates a severe fetch error (404, 500 etc.)
Use npm run test-stations
to test and modify the json. If the script fails, update
the file manually or implement new parser logic for offending page. Always review the changeset
generated by the script.
The following icons (from www.flaticon.com) are used (CC3.0) in the app:
- cog by Dave Gandy
- loading by Google
- radio by Darius Dan