-
Notifications
You must be signed in to change notification settings - Fork 767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Method invocation 'onPostRequest' may produce 'java.lang.NullPointerException' #296
Comments
Same problem here edit:
Not sure why we are checking for a google message ID for local notification, maybe @yogevbd can shed some light on this. Or did we missed a setup step? |
Any news on this? I'm also experiencing it. Thanks! |
I worked around it by passing in an empty string for the 'google.message_id' value when calling localNotification(). I didn't try running instead against #71, but I would hope that would resolve the issue. |
Great, thanks! Works for me!
|
Add the |
Has anyone tried iOS yet? Is this on iOS as well? |
Remove verify notification, Closes #296
Revert "Remove verify notification, Closes #296"
Hi,
I am trying to get a local notification on Android and I see the below error when I run the device:
D/ReactNativeNotifs: Native method invocation: postLocalNotification
E/unknown:ReactNative: Exception in native call
java.lang.NullPointerException: Attempt to invoke interface method 'int com.wix.reactnativenotifications.core.notification.IPushNotification.onPostRequest(java.lang.Integer)' on a null object reference
at com.wix.reactnativenotifications.RNNotificationsModule.postLocalNotification(RNNotificationsModule.java:102)
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:160)
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:751)
.
.
Any idea, what could have been wrong?
notificationservice.js:
/*
*/
import {NotificationsAndroid} from 'react-native-notifications';
const postNotification = () => {
let localNotification = NotificationsAndroid.localNotification({
body: "My first notification",
title: "test title",
});
};
module.exports = postNotification;
The text was updated successfully, but these errors were encountered: