question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android 8 (Oreo) support & state of repo

See original GitHub issue

First off, as a fellow open source maintainer, I’d like to thank @zo0r @npomfret (and everyone) for the job they did in maintaining this library for a long time but (and trust me I’m sorry about this) right now this repo is basically abandoned; nobody answers issues nor reviews PRs nor updates the lib since months.

Please, allow new blood to jump in and keep the library at least maintained if not actively developed upon. Or transfer it to somebody else. Push notifications are a core feature for many react native apps and it’s not good to rely on a fork. I suggest you ask to the React Native Community to at least take it over so that other people can help with it.

That said, I’m using react-native 0.49 and build tools 26 and when I tried our prod app on an Android 8 device, when I set up the push notifications in the app a toast message appears:

developer warning for package <app_name> failed to post notification on channel null see log for more details

By doing a quick search it looks like in Android O:

Starting in Android 8.0 (API level 26), notification channels allow you to create a user-customizable channel for each type of notification you want to display. Notification channels provide a unified system to help users manage notifications. When you target Android 8.0 (API level 26), you must implement one or more notification channels to display notifications to your users. If you don’t target Android 8.0 (API level 26) but your app is used on devices running Android 8.0 (API level 26), your app behaves the same as it would on devices running Android 7.1 (API level 25) or lower.

By looking around it shouldn’t be too hard to implement this on the native side:

And no, I cannot move back to lower build tools because of other libs I’m using.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:26
  • Comments:24 (2 by maintainers)

github_iconTop GitHub Comments

18reactions
eyeCU113commented, Mar 15, 2018

Guys, we faced the same issue in our app. No notifications were showing up on devices with Android 8 on them. It turned out the fix was easy. Just go into your app/build.gradle and switch your targetSdkVersion from 26 to 25. Leave everything else as it is. You don’t have to lower the buildToolsVersion or compileSdkVersion.

7reactions
calcazarcommented, Apr 25, 2018

@sandropoluan @eyeCU113 @rhysgoehring @kelset

I added your changes in to the Community Edition clone I created of this Library located here: https://github.com/calcazar/react-native-push-notification-CE

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android 8.0 Compatibility Definition
Introduction. This document enumerates the requirements that must be met in order for devices to be compatible with Android 8.0.
Read more >
Android 8.0 Behavior Changes
System and API behavior changes that can affect apps running on Android 8.0 Oreo.
Read more >
Migrating to Android 8.0
Update your target version and use Android 8.0 features. This section explains how to enable full support for Android 8.0 (API level 26)...
Read more >
Android 8.0 Features and APIs
Android 8.0 (API level 26) introduces adaptive launcher icons. Adaptive icons support visual effects, and can display a variety of shapes across ...
Read more >
8.0 Oreo - Android
With your permission, Autofill remembers your logins to get you into your favorite apps at supersonic speed. Smart text selection: Android Oreo recognizes...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found