Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LocalNotifiacion and LocalNotificationSchedule not working #2425

Open
AissaRouk opened this issue Sep 25, 2024 · 1 comment
Open

LocalNotifiacion and LocalNotificationSchedule not working #2425

AissaRouk opened this issue Sep 25, 2024 · 1 comment

Comments

@AissaRouk
Copy link

Hello, I've been having this problem for a while, so basically, the local notifications were working fine until one day that they stopped working, I don't know what happened, but it just stopped(maybe I touched something).

Anyways, I'll leave the android folder code here, would love if you could help me guys:

  • android/build.gradle
    buildscript {
    ext {
    buildToolsVersion = "34.0.0"
    minSdkVersion = 23
    compileSdkVersion = 34
    targetSdkVersion = 34
    ndkVersion = "26.1.10909125"
    kotlinVersion = "1.9.22"
    supportLibVersion = "23.1.1"
    }
    repositories {
    google()
    mavenCentral()
    }
    dependencies {
    classpath("com.android.tools.build:gradle")
    classpath("com.facebook.react:react-native-gradle-plugin")
    classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
    }
    }

apply plugin: "com.facebook.react.rootproject"

  • android/app/src/main/AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
    <uses-permission android:name="android.permission.USE_EXACT_ALARM" />
    <uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
    <uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>

<application
  android:name=".MainApplication"
  android:label="@string/app_name"
  android:icon="@mipmap/round_logo"
  android:roundIcon="@mipmap/round_logo"
  android:allowBackup="false"
  android:theme="@style/AppTheme">
  <activity
    android:name=".MainActivity"
    android:label="@string/app_name"
    android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
    android:launchMode="singleTask"
    android:windowSoftInputMode="adjustResize"
    android:exported="true">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
  </activity>
    <!-- Change the resource name to your App's accent color - or any other color you want -->
    <meta-data  android:name="com.dieam.reactnativepushnotification.notification_color"
                android:resource="@color/white"/> <!-- or @android:color/{name} to use a standard color -->

    <receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationActions" android:exported="false"/>
    <receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationPublisher" android:exported="false"/>
    <receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationBootEventReceiver" android:exported="false">
        <intent-filter>
            <action android:name="android.intent.action.BOOT_COMPLETED" />
            <action android:name="android.intent.action.QUICKBOOT_POWERON" />
            <action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/>
        </intent-filter>
    </receiver>

    
</application>
  • android/app/src/main/res/values/colors.xml
#FFF
  • I didn't touch my android/settings.gradle, android/app/build.gradle nor MainApplication.kt

Some remedies I tried was using another virtual device, trying to link manually, but it doesn't seem to work.

Any suggestions on why this is happening?

Thank you in advance guys :)

@nppull
Copy link

nppull commented Oct 16, 2024

test on android 11, android 13
react-native 0.73.5
react-native-push-notification: 8.1.1

same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants