-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Android did not receive any notification, but IOS working properly #1380
Comments
Hi @bobbyrinaldy |
And I just saw you manifest is not up to date; check the Readme 😉 |
2 question :
|
Quick Update :
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.testapp">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<application
android:usesCleartextTraffic="true"
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
<meta-data android:name="com.dieam.reactnativepushnotification.notification_channel_name"
android:value="YOUR NOTIFICATION CHANNEL NAME"/>
<meta-data android:name="com.dieam.reactnativepushnotification.notification_channel_description"
android:value="YOUR NOTIFICATION CHANNEL DESCRIPTION"/>
<!-- 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.RNPushNotificationPublisher" />
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationBootEventReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<service android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationRegistrationService"/>
<service
android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationListenerService"
android:exported="false" >
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
</application>
</manifest>
and result is the same as what im asking above, sorry. |
@bobbyrinaldy I will investigate ASAP |
okay, i will waiting for it then. btw, thanks for your quick response, love what you did 👍 |
Hi @bobbyrinaldy What I don't understand with this Firebase Feature is we just need to generate a token and setup analytics, but it's not enough... I saw you can send the token to a backend en register to a Topic (like android), and with rnfirebase: |
push notification from rnfirebase-messaging cannot push the notification for me, idk why. but this package do ya i know, but simple one is using this package to manage how FCM received like on IOS did. |
Hi @Dallas62 ,
i think my problem coming from i installed all of that RNFB |
I don't know why rnfirebase is not working for you, or if there is any conflict, it's strange. |
yea thanks, try to to test push notification using CURL/Postman and it is seem's working now for Android to receive Notification on Foreground and Backround app, but still Dead/Killed state did not received. can you check it ? |
For Dead/Killed, test with then version on master, the default channel is not created on the current version. |
yes, im using like this on my package json :
and my Manifest like on Docs <uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<application ....>
<meta-data android:name="com.dieam.reactnativepushnotification.notification_channel_name"
android:value="PUSH_NOTIFICATION"/>
<meta-data android:name="com.dieam.reactnativepushnotification.notification_channel_description"
android:value="PUSH_NOTIFICATION"/>
<!-- 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.RNPushNotificationPublisher" />
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationBootEventReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<service android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationRegistrationService"/>
<service
android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationListenerService"
android:exported="false" >
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service> |
@Dallas62 i tried to build the apps on my other phone, seem's like onRegister called but when i hit with Postman , it say NotRegistered |
Hi, my iOS not working in foreground, but background is working, am I missing any setup? "@react-native-firebase/app": "^6.4.0", |
Hi @programmer-RN |
Why is mine behaving differently compared to all of you lmao. My android is working fine, my iOS foreground is working fine but iOS background can't work haha |
hi @Gabsys, you can check others issues, this is due to a change in https://github.com/react-native-community/push-notification-ios |
I can't find the relevant issues though. Could you give me some heads up/tips? >< |
Try this one: |
Originally this topic was to discuss Android remote push, right? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions. |
Question
this is wierd actually, a day ago on Android , the push notification is working even when application is on Foreground or Background. then im going for implement it on IOS, its working too even in Debug or Release.
but, when i try to test on Android again, look like it got some problem. it's working if im test using Firebase Console by targeting Device Token Directly, but when i try to Target to App like bellow, its now not working, same as if im close the application.
Working :
Not Working :
i have test it send to both Ios and Android, the the result is IOS got the push notification, but Android is NOT.
Here's the code i have using on my React Native code :
Package.json :
AndroidManifest.xml
The text was updated successfully, but these errors were encountered: