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] send local notification show, but send notification, send data, send notification with data, schedule notification in 5s not showing although its show success in debugger

See original GitHub issue

screenshot_2017-09-07-20-08-16 1 fcm1

first one is screenshot from asus zenfone 5. 2nd one is screenshot from react native debugger that screenshot shows that send notification function success and than I receive notification from FCM (at debugger console), but nothing show in my device other than send local notification function.

here is my AndroidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.luthfi"
    android:versionCode="1"
    android:versionName="1.0">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
    <uses-permission android:name="android.permission.RECORD_AUDIO"/> <!-- for react-native-camera -->
    <uses-permission android:name="android.permission.RECORD_VIDEO"/> <!-- for react-native-camera -->
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <!-- for react-native-camera -->
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <!-- for react-native-camera -->
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <!-- for geolocation -->

    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.VIBRATE" />

    <uses-sdk
        android:minSdkVersion="16"
        android:targetSdkVersion="22" />

    <application
      android:name=".MainApplication"
      android:allowBackup="true"
      android:label="@string/app_name"
      android:icon="@mipmap/ic_launcher"
      android:theme="@style/AppTheme">
      <meta-data android:name="com.google.android.geo.API_KEY" android:value="xxxxxxxxxxx"/>

      <receiver android:name="com.evollu.react.fcm.FIRLocalMessagingPublisher"/>
      <receiver android:enabled="true" android:exported="true"  android:name="com.evollu.react.fcm.FIRSystemBootEventReceiver">
        <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"/>
          <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
      </receiver>

      <service android:name="com.evollu.react.fcm.MessagingService" android:enabled="true" android:exported="true">
        <intent-filter>
          <action android:name="com.google.firebase.MESSAGING_EVENT"/>
        </intent-filter>
      </service>

      <service android:name="com.evollu.react.fcm.InstanceIdService" android:exported="false">
        <intent-filter>
          <action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
        </intent-filter>
      </service>

      <activity
        android:name=".MainActivity"
        android:label="@string/app_name"
        android:launchMode="singleTop"
        android:windowSoftInputMode="adjustResize"
        android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
        <intent-filter>
          <action android:name="fcm.ACTION.HELLO" />
          <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
            <action android:name="android.intent.action.DOWNLOAD_COMPLETE"/> <!-- for react-native-fetch-blob (download launcher) -->
        </intent-filter>        
      </activity>
      <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
    </application>

</manifest>

what should I do to fix that? thankss

@evollu

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
luthfidc03commented, Sep 7, 2017

@evollu I copied entire example code but its keep dont show my notification when I send notification, nothing happen

fcm2

1reaction
evollucommented, Sep 7, 2017

ok. remote notification doesn’t show banner by default, it only shows up in tray. It might be the cause

I’ve updated the example here https://github.com/evollu/react-native-fcm/blob/master/Examples/simple-fcm-client/app/FirebaseClient.js#L26

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create a Notification - Android Developers
To update this notification after you've issued it, call NotificationManagerCompat.notify() again, passing it a notification with the same ID you used ...
Read more >
Android notification is not showing - Stack Overflow
I have established code. The notification should be working, but for some reason it is not working. The Notification isn't showing at all....
Read more >
Android Notifications Not Showing Up? 10 Fixes You Can Try
Not seeing notifications show up on your Android phone? Try these fixes to get Android notifications working again.
Read more >
Abusing Notification Services on Smartphones for Phishing ...
Our studies on Android and BlackBerry OS show that it is fea- ... views to send fraudulent phishing notifications and anonymous spam notifications...
Read more >
Local Notifications for Android and iOS in Unreal Engine
The current implementation of Local Notifications for both Android and iOS is very simplistic in its setup and execution. This system also will...
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