Onesignal not sending all Android Notification - android

I am using onesignal for android push notifications. But not all notifications are being sent. Sometimes notifications are sent while sometimes they are not.... Whats the problem? Please Explain.
the problem is not with the code because some notification get sent but most of them do not get sent.

There are a few more details that are needed to be able to diagnose this problem.
First, is OneSignal saying that there were any errors? If so, you can find the cause of the errors by visiting the settings page for your OneSignal app and selecting "Show details" next to any visible errors or warnings.
Next, if OneSignal is not showing 0 possible recipients then that means your device has not opted-in to notifications, or the device has uninstalled your app, or the OneSignal SDK was not properly installed in your app.
Finally, if OneSignal is showing that the notification was delivered but it was not received, the most common causes of this issue on Android devices are as follows:
The user has force-closed your app. (Notifications will not be delivered to apps that were force closed)
The user has denied notification permissions ( Check the notification setting under Settings > Apps)
App is closed on a Huawei or Xiaomi device due their custom Android tweaks.
a. Huawei - Go to Settings > "Protected apps", check your app.
b. Xiaomi - Make sure "Auto-start" property enabled for your app in the settings.
In app - A notification will not be displayed on the device if your app is currently in focus by default. However, you can call EnableInAppAlertNotification with true to show notifications as alert boxes in your app.

Related

Android removing my apps notifications automatically

Android removes my apps notifications when it creates more than 3 notifications.
This is not happening on all the phone, I can't even reproduce this on the emulator.
It is happening with my Moto G5S Plus running Android 7.1.1.
The error I am getting in the log is
NotificationService: Suppressing notification from package by user request.
The mentioned error comes if the user has disabled notification of the particular application,
to check weather notifications are allowed or not refer to this link
checking if notifications are enabled for specific package
Otherwise, you can manually enable notification of particular application from App Info settings

android O not receiving FCM push messaging while phone is in sleep mode

I am using FCM for push messaging. I did not getting FCM notification if application is closed by user in android Noughat OS.
If user not close app, push notification works fine.
also if user add application in protected app from setting->protected apps app works even in sleep mode.
In settings, you need the settings as below
Settings->Notification->App->On the lock screen
It should not be do not show at all. By default it is always hide sensitive notification, hence if notify not defined as sensitive, will be hidden.

OneSignal Push Notification Failed when user kill the application

I have implemented push notification with OneSingal APIs in my android project. I'm facing an issue while clicking the push notification, that i was unable to launch the specified screen when the user click the push notification, If the user kill the app from background(long press and remove the pplication from list of apps). I have registered the Open/Receiver handlers in application class. Seems like, the handlers are no more visible in the app, when user kill/remove the app from background.
Please help me to resolve the issue.
Unfortunately Android apps are not able to receive notifications when they have been force-closed. This is part of the design of the Android OS.

Android - an app to disable facebook push notification

Is it possible to create an app that it's sole purpose is to toggle on/off the facebook push notifications? (like a silence for facebook)?
If you give your app notification-access permissions you should be able to dismiss the notifications as soon as they pop-up, but the user will still get notified (sound or vibrating), although he won't see the notification when the device is unlocked as your app would have dismissed it.
Pushbullet does that.
In any case it's no use, the user can go to the Facebook app details and uncheck the notifications box.

GCM push notification works after app Force Stop?

I have used GCM to get push notifications, now if I Force stop the app from the settings on the Android device, will it be able to get push notifications?
I have read many posts that say in this case an app cannot receive notifications.
Is there any possibility to get notifications?
Once you force-stop your app from Settings, your code will not run until something manually runs one of your components (ie the user manually launches an activity).
Therefore after force-stopping your app from Settings, you will not receive GCM messages.
If you want to get notifications you have to manually restart your app.
This is by design since Android 3.1.
Apps that are in the stopped state do not receive broadcast Intents.
Stopped state is:
when the app is initially installed (before the user runs something in
the app) or
after a Force Stop.
You can find more about this here: http://developer.android.com/about/versions/android-3.1.html#launchcontrols

Categories

Resources