https://github.com/bartolomej/rn-alarm
React Native alarm clock application ⏰
https://github.com/bartolomej/rn-alarm
alarm-clock example-code example-project react-native react-native-app
Last synced: 4 months ago
JSON representation
React Native alarm clock application ⏰
- Host: GitHub
- URL: https://github.com/bartolomej/rn-alarm
- Owner: bartolomej
- License: mit
- Created: 2020-02-07T18:51:47.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-02T15:48:19.000Z (over 2 years ago)
- Last Synced: 2025-02-01T03:24:02.480Z (5 months ago)
- Topics: alarm-clock, example-code, example-project, react-native, react-native-app
- Language: Java
- Homepage:
- Size: 22.7 MB
- Stars: 66
- Watchers: 3
- Forks: 18
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# React Native Alarm app
> This is an example implementation of a basic alarm clock app.
Made for Android with [React Native](https://facebook.github.io/react-native/) framework.It demonstrates communication with native Android code via [react-native bridge](https://facebook.github.io/react-native/docs/native-modules-android),
scheduling Android alarms with [AlarmManager](https://developer.android.com/reference/android/app/AlarmManager),
working with foreground services for playing background music,...| View all alarms | Create or edit alarm | Ring |
|-----------------------------|-------------------------------|--------------------------------|
|  |  |  |## Scripts
- `npm start` - starts metro build server
- `npm run android` - builds and runs android app
- `npm run android:release:build:apk` - builds release apk ready for publishing
- `npm run android:release:build:aab` - builds release aab ready for publishing
- `npm run android:release:test` - builds release apk for testing## Release build
Read about release builds [here](https://facebook.github.io/react-native/docs/signed-apk-android).
1. Run the following command under JDK bin folder and replace password in `~/.gradle/gradle.properties`.
```bash
sudo keytool -genkey -v -keystore release.keystore -alias rn-alarm-app -keyalg RSA -keysize 2048 -validity 10000
```2. Store keystore credentials as environment variables in `.bash_profile`
```bash
export ALARM_APP_KEYSTORE_ALIAS_NAME=keystore-alias
export ALARM_APP_KEYSTORE_KEY_PASSWORD=*****
export ALARM_APP_KEYSTORE_PASSWORD=*****
```## Resources
- [Storing android signing config](https://medium.com/@umar.hussain/storing-android-signing-config-credentials-secure-and-platform-independent-c593464f927c)
- [Setting environment variables in MacOS](https://medium.com/@himanshuagarwal1395/setting-up-environment-variables-in-macos-sierra-f5978369b255)