react-native-gcm-android
react-native-gcm-android copied to clipboard
RN 0.29 needs Activity instance?
I can't use new NotificationPackage(this)
with 0.29 as MainActivity.java stuff was moved to MainApplication.java so I'm not sure how to get an instance of Activity.
same here
got this error:

"dependencies": { "react-native": "^0.29.0", "react-native-gcm-android": "^0.2.0", "react-native-system-notification": "^0.1.11", }
still get the error
node_modules/react-native-gcm-android/android/src/main/java/com/oney/gcm/BackgroundService.java:34: error: constructor NotificationPackage in class NotificationPackage cannot be applied to given types;
.addPackage(new NotificationPackage(null))
^
required: no arguments
found: <null>
reason: actual and formal argument lists differ in length
1 error
:RNGcmAndroid:compileReleaseJavaWithJavac FAILED
FAILURE: Build failed with an exception.
"dependencies": { "react-native": "^0.33.0", "react-native-gcm-android": "^0.2.0", "react-native-system-notification": "^0.2.1" }
ok, I switch to react-native-push-notification [https://github.com/zo0r/react-native-push-notification]
it supports "react-native": "^0.33.0",
you need to manually linking the react-native-system-notification, but it is pretty straightforward. [https://github.com/neson/react-native-system-notification]