Closed arnaud-albalat closed 4 years ago
Which version of React native and Onesignal?
this is my conf: "react": "16.8.3", "react-native": "0.59.9", "react-native-onesignal": "^3.5.0"
I receive in app but not in background :(
My conf:
"react": "16.8.3",
"react-native": "0.59.8",
"react-native-onesignal": "3.5.0",
Please include the full stack trace
I'm was having this issue with Android 9 to, it was solved putting android:permission="android.permission.BIND_JOB_SERVICE" in AndroidManifest.xml
https://documentation.onesignal.com/docs/service-extensions#section-notification-extender-service
compileSdkVersion 26 buildToolsVersion '26.0.2'
But with version 27 works too.
<service
android:name="com.geektime.rnonesignalandroid.NotificationNotDisplayingExtender"
android:permission="android.permission.BIND_JOB_SERVICE"
android:exported="false">
<intent-filter>
<action android:name="com.onesignal.NotificationExtender" />
</intent-filter>
</service>
Thanks for the solution @raphael-evolutap , I will close since I received no reply from OP or others
In case someone else still has this issue, I had to remove the this :
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.google.android.gms') {
details.useVersion '17.0.0'
}
if (requested.group == 'com.google.firebase') {
details.useVersion '17.0.0'
}
}
in my build.gradle
file.
I developed a React Native app that crashes every time a push notification from OneSignal is received while the app is active.
The error is
java.lang.NoSuchMethodError: No static method zzc
.If I receive the notification when the app is on background, there is no problem.
Here is my build.gradle file:
And my app/build.gradle file:
Do you know where the problem could come from?