react-native-local-notifications
react-native-local-notifications copied to clipboard
Local Notification is not working
node version: 10:14:1 react-native version: 0.57.8 android version: lollipop 5.1
I am getting error in MainActivity.java when i run react-native run-android NotificationManager nMgr = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); error is in Context
then i remove Context, working fine but local notification is not triggering. I followed step by step procedure, everything is fine. Please let me know about this issue.
Thanks.
Did you also include
import android.content.Context;
at the top of your MainActivity file?
Did you also include
import android.content.Context;
at the top of your MainActivity file?
i was missed this import , after import local notification is not triggering.
Does https://github.com/wumke/react-native-local-notifications/issues/17 solve your issue?
readme is updated... is your problem solved? what was the issue?
I have the same issue: {PATH}\testapp\android\app\src\main\java\com\testapp\MainActivity.java:19: error: cannot find symbol NotificationManager nMgr = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); ^ symbol: class NotificationManager location: class MainActivity
@atifaziz1 and @VitalieStirbu add this import android.app.NotificationManager;
.
By the way, notifications doesn't work. I'm using the sample code described on readme and got nothing.
Any help?
I've tested the latest release available on npm in a fresh RN project, should work...
@wumke Thanks for this nice package. can you plz add an example project?
@rashidul-hasan everything you need to configure is mentioned in the readme, usage examples are also included.
Full buildable example projects require updates for each RN version, which makes it a hell to maintain the repository! Also, I try to minimize the size of my repo's, that means not including things unless absolutely needed...
Please, see your code in:
RNLocalNotifications.setAndroidIcons("ic_launcher", "mipmap", "ic_launcher", "mipmap");
Your code can be searching an image that do not exist.