Closed jsamr closed 4 years ago
@staltz @jsamr can we please resolve conflicts and merge? I am also having issues with channel.
Sorry, I don't intend to maintain this repository as an aggregator of contributions, it takes too much work from me, alongside hundreds of other repos I have. This repository itself was a fork of https://github.com/anysome/react-native-pure-notification , I recommend maintaining your own fork if these changes are important to you.
This PR fixes #1 and #2.
The set of changes can be summed up as follow
Upgrade appcompat (resolves #1)
build.gradle
Upgradecom.android.support:appcompat-v7
to26.0.0
in order to avoid the deprecatedNotification.Builder
build.gradle
Upgrade SDK to 26build.gradle
Add google to build repositories to benefit from gradle 3build.gradle
Add google to repositories to benefit fromcom.android.support:appcompat-v7:26.0.0
android/src/main/java/com/staltz/reactnativeandroidlocalnotification/Notification.java
replaceandroid.support.v7.app.NotificationCompat
withandroid.support.v4.app.NotificationCompat
. That change resolves #1 because react native projects use the latests app compat library, in whichandroid.support.v7.app.NotificationCompat
does not exists.Use channels for API 26+ (resolves #2)
android/src/main/java/com/staltz/reactnativeandroidlocalnotification/Notification.java
build
method now has an API check and use the newBuilder
constructorandroid/src/main/java/com/staltz/reactnativeandroidlocalnotification/NotificationAttributes.java
addedchannelID
andchannelName
attributesREADME
Document new attributes,channelID
andchannelName
Misc:
build.gradle
Replace deprecatedcompile
withimplements
build.gradle
buildTools version set to27.0.3
android/gradle/wrapper/gradle-wrapper.properties
upgrade gradle distribution to 4.6 to use with latest android studio.gitignore
add.vscode/