emekalites / react-native-alarm-notification

schedule alarm and local notification in react-native
https://www.npmjs.com/package/react-native-alarm-notification
MIT License
223 stars 94 forks source link

Not working on last version of React Native #159

Open jaimebiernaski opened 2 years ago

jaimebiernaski commented 2 years ago

Hi,

I'm unable to get it working on a brand new RN project

  1. Create a empty project with npx react-native init alert
  2. Follow the these steps, including the changes on the native code.
  3. Copy the exact same code from the /example/App.js

Expected result:

The library should works as in the provide example.

Current result:

The lib didn't work as expected. The notification is not fired, the sound not played and the banner does not appear.

// package.json
...
"dependencies": {
    "react": "17.0.2",
    "react-native": "0.66.3",
    "react-native-alarm-notification": "^1.8.0"
  },
...  

// build.gradle
...
buildscript {
    ext {
        buildToolsVersion = "30.0.2"
        minSdkVersion = 21
        compileSdkVersion = 30
        targetSdkVersion = 30
        ndkVersion = "21.4.7075529"
    }
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath("com.android.tools.build:gradle:4.2.2")
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}
...
k2an commented 2 years ago

+1 same on last version of RN

tmbax0098 commented 2 years ago

The lib didn't work as expected. The notification is not fired, the sound played and the banner does not appear.

yoursinger commented 2 years ago

I'm having another problem. The upgraded rn prompts this: A problem occurred configuring project ':react-native-alarm-notification'. com.android.builder.errors.EvalIssueException: compileSdkVersion is not specified. Please add it to build.gradle

Tonisg91 commented 2 years ago

I'm having another problem. The upgraded rn prompts this: A problem occurred configuring project ':react-native-alarm-notification'. com.android.builder.errors.EvalIssueException: compileSdkVersion is not specified. Please add it to build.gradle

Hello! I'm having the same problem. Did you finally solve it?

ayberkanilatsiz commented 1 year ago

@Tonisg91 @yoursinger you can change react-native-alarm-notification build grade like this:

https://gist.github.com/ayberkanilatsiz/4e0672c0f9e02bd9a0aae7ea5ca88e8d