react-native-android-alarms | React Native library for Android : Schedules | Android library
kandi X-RAY | react-native-android-alarms Summary
kandi X-RAY | react-native-android-alarms Summary
react-native-android-alarms is a Java library typically used in Mobile, Android applications. react-native-android-alarms has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. However react-native-android-alarms build file is not available. You can download it from GitHub.
This React Native library will allow you to schedule and show alarms on Android (tested on >= API 21). To see a working example of this module, see Dawn Chorus. The code for this module was modified from Christoph Michel's App Launcher.
This React Native library will allow you to schedule and show alarms on Android (tested on >= API 21). To see a working example of this module, see Dawn Chorus. The code for this module was modified from Christoph Michel's App Launcher.
Support
Quality
Security
License
Reuse
Support
react-native-android-alarms has a low active ecosystem.
It has 4 star(s) with 4 fork(s). There are 4 watchers for this library.
It had no major release in the last 6 months.
There are 1 open issues and 2 have been closed. On average issues are closed in 45 days. There are no pull requests.
It has a neutral sentiment in the developer community.
The latest version of react-native-android-alarms is current.
Quality
react-native-android-alarms has 0 bugs and 41 code smells.
Security
react-native-android-alarms has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
react-native-android-alarms code analysis shows 0 unresolved vulnerabilities.
There are 0 security hotspots that need review.
License
react-native-android-alarms is licensed under the MIT License. This license is Permissive.
Permissive licenses have the least restrictions, and you can use them in most projects.
Reuse
react-native-android-alarms releases are not available. You will need to build from source code and install.
react-native-android-alarms has no build file. You will be need to create the build yourself to build the component from source.
Installation instructions, examples and code snippets are available.
react-native-android-alarms saves you 119 person hours of effort in developing the same functionality from scratch.
It has 300 lines of code, 25 functions and 9 files.
It has medium code complexity. Code complexity directly impacts maintainability of the code.
Top functions reviewed by kandi - BETA
kandi has reviewed react-native-android-alarms and discovered the below as its top functions. This is intended to give you an instant insight into react-native-android-alarms implemented functionality, and help decide if they suit your requirements.
- Handle an intent intent
- Displays a missed alarm
- Schedules the alarm
- Creates a pending intent
- Get the alarm manager
- Clear an alarm
- Creates a pending intent for the alarm
- Launch application activity
- Launches the application with the given alarm ID
- Creates an alarm
- Create a list of JS modules
- This method is called when an activity is executed
- Create view managers
- Callback when an intent is received
- Send an event
- Creates native modules
- Launch the application with missed alarms
- Handle a new intent
Get all kandi verified functions for this library.
react-native-android-alarms Key Features
No Key Features are available at this moment for react-native-android-alarms.
react-native-android-alarms Examples and Code Snippets
No Code Snippets are available at this moment for react-native-android-alarms.
Community Discussions
Trending Discussions on react-native-android-alarms
QUESTION
Add alarm project into a react native expo
Asked 2019-Sep-17 at 13:28
How do I use this project https://github.com/vasyl91/react-native-android-alarms in an expo project?
The instruction mention an android folder but in my expo project I didn't see any android folder.
...ANSWER
Answered 2019-Sep-17 at 13:28If you want to use this module, you must eject to the Expo. You can't just use it. You can eject with this command.
You can run this code . expo eject
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install react-native-android-alarms
Run npm install --save git+https://github.com/CMP-Studio/react-native-android-alarms.git.
Run npm install --save git+https://github.com/CMP-Studio/react-native-android-alarms.git
Add the following to android/settings.gradle: include ':react-native-android-alarms' project(':react-native-android-alarms').projectDir = new File(settingsDir, '../node_modules/react-native-android-alarms/android')
Add the following to android/app/build.gradle: ... dependencies { ... compile project(':react-native-android-alarms') }
Add the following to android/app/src/main/AndroidManifest.xml: <manifest ... > ... <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> ... <application ... > <receiver android:name="com.dawnchorus.alarms.AlarmReceiver" /> <receiver android:name="com.dawnchorus.alarms.RebootReceiver"> <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> <action android:name="android.intent.action.QUICKBOOT_POWERON" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </receiver> <service android:name="com.dawnchorus.alarms.RebootService" android:exported="false"/> ... </application> </manifest>
Add the following to android/app/src/main/java/**/MainApplication.java: import com.dawnchorus.alarms.AlarmPackage; // add this for react-native-android-alarms public class MainApplication extends Application implements ReactApplication { @Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new AlarmPackage() // add this for react-native-android-alarms ); } }
In MainActivity.java, 1) Add flags to Window that allow it to open over lockscreen and 2) Extend ReactActivityDelegate to pass data from the native module to your react native code as initial props @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // add final Window win = getWindow(); win.addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED | WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD | WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON | WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON | WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON); } public static class AlarmActivityDelegate extends ReactActivityDelegate { private static final String ALARM_ID = "alarmID"; private static final String MISSED_ALARMS = "missedAlarms"; private Bundle mInitialProps = null; private final @Nullable Activity mActivity; public AlarmActivityDelegate(Activity activity, String mainComponentName) { super(activity, mainComponentName); this.mActivity = activity; } @Override protected void onCreate(Bundle savedInstanceState) { mInitialProps = new Bundle(); // bundle is where we put our alarmID with launchIntent.putExtra Bundle bundle = mActivity.getIntent().getExtras(); if (bundle != null && bundle.containsKey(ALARM_ID)) { // put any initialProps here mInitialProps.putString(ALARM_ID, bundle.getString(ALARM_ID)); } if (bundle != null && bundle.containsKey(MISSED_ALARMS)) { // put any initialProps here mInitialProps.putString(MISSED_ALARMS, bundle.getString(MISSED_ALARMS)); } super.onCreate(savedInstanceState); } @Override protected Bundle getLaunchOptions() { return mInitialProps; } }; @Override protected ReactActivityDelegate createReactActivityDelegate() { return new AlarmActivityDelegate(this, getMainComponentName()); }
Run npm install --save git+https://github.com/CMP-Studio/react-native-android-alarms.git
Add the following to android/settings.gradle: include ':react-native-android-alarms' project(':react-native-android-alarms').projectDir = new File(settingsDir, '../node_modules/react-native-android-alarms/android')
Add the following to android/app/build.gradle: ... dependencies { ... compile project(':react-native-android-alarms') }
Add the following to android/app/src/main/AndroidManifest.xml: <manifest ... > ... <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> ... <application ... > <receiver android:name="com.dawnchorus.alarms.AlarmReceiver" /> <receiver android:name="com.dawnchorus.alarms.RebootReceiver"> <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> <action android:name="android.intent.action.QUICKBOOT_POWERON" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </receiver> <service android:name="com.dawnchorus.alarms.RebootService" android:exported="false"/> ... </application> </manifest>
Add the following to android/app/src/main/java/**/MainApplication.java: import com.dawnchorus.alarms.AlarmPackage; // add this for react-native-android-alarms public class MainApplication extends Application implements ReactApplication { @Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new AlarmPackage() // add this for react-native-android-alarms ); } }
In MainActivity.java, 1) Add flags to Window that allow it to open over lockscreen and 2) Extend ReactActivityDelegate to pass data from the native module to your react native code as initial props @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // add final Window win = getWindow(); win.addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED | WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD | WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON | WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON | WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON); } public static class AlarmActivityDelegate extends ReactActivityDelegate { private static final String ALARM_ID = "alarmID"; private static final String MISSED_ALARMS = "missedAlarms"; private Bundle mInitialProps = null; private final @Nullable Activity mActivity; public AlarmActivityDelegate(Activity activity, String mainComponentName) { super(activity, mainComponentName); this.mActivity = activity; } @Override protected void onCreate(Bundle savedInstanceState) { mInitialProps = new Bundle(); // bundle is where we put our alarmID with launchIntent.putExtra Bundle bundle = mActivity.getIntent().getExtras(); if (bundle != null && bundle.containsKey(ALARM_ID)) { // put any initialProps here mInitialProps.putString(ALARM_ID, bundle.getString(ALARM_ID)); } if (bundle != null && bundle.containsKey(MISSED_ALARMS)) { // put any initialProps here mInitialProps.putString(MISSED_ALARMS, bundle.getString(MISSED_ALARMS)); } super.onCreate(savedInstanceState); } @Override protected Bundle getLaunchOptions() { return mInitialProps; } }; @Override protected ReactActivityDelegate createReactActivityDelegate() { return new AlarmActivityDelegate(this, getMainComponentName()); }
Support
For any new features, suggestions and bugs create an issue on GitHub.
If you have any questions check and ask questions on community page Stack Overflow .
Find more information at:
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page