Local Notifications not working on Android Oreo (target SDK 26)
See original GitHub issueProblem: Notifications are working fine on iOS, but when I run the app on my Android device with Oreo I get no notifications and the following error in my logs:
12-08 13:19:23.423 4324 26687 E NotificationService: No Channel found for pkg=com.saferackexample, channelId=null, id=1222192301, tag=null, opPkg=com.saferackexample, callingUid=10196, userId=0, incomingUserId=0, notificationUid=10196, notification=Notification(channel=null pri=1 contentView=null vibrate=[0,300] sound=content://settings/system/notification_sound defaults=0x4 flags=0x10 color=0x00000000 category=call vis=PRIVATE)
compileSdkVersion:` 26, buildToolsVersion: 26.0.02,
build.gradle dependencies:
dependencies {
compile project(':react-native-push-notification')
compile(project(':react-native-maps')){
exclude group: 'com.google.android.gms', module: 'play-services-base'
exclude group: 'com.google.android.gms', module: 'play-services-maps'
}
compile project(':react-native-background-geolocation')
compile(name: 'tslocationmanager', ext: 'aar')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:26.1.0"
compile "com.facebook.react:react-native:+" // From node_modules
compile ("com.google.android.gms:play-services-base:11.6.0") {
force = true;
}
compile ("com.google.android.gms:play-services-maps:11.6.0") {
force = true;
}
compile ("com.google.android.gms:play-services-gcm:11.6.0") {
force = true;
}
compile ("com.google.android.gms:play-services-location:11.6.0") {
force = true;
}
}
I installed the package exactly as described in the repo and I’m only looking to use local notifications in my app. Has anyone come across this or have a possible solution?
Thank you very much for your assistance.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:16 (1 by maintainers)
Top GitHub Comments
For anyone else struggling with this. I got around this issue by downgrade my target sdk version to 25. Not ideal but works until a proper fix is merged in.
In app/build.gradle
For Android Oreo support on localNotification, I added these lines in manifest
as mentioned in localNotificationSchedule configuration here