-
Notifications
You must be signed in to change notification settings - Fork 0
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
notification profile first one work only #56
Comments
Hi @ate864 , First of all, thank you for using UTNotifications! I just checked the scenario you've described: everything works well, appropriate sounds are played regardless of the profiles order. If incorrect profile is specified, "default" profile is always chosen. It all works well with both local and push notifications, so I couldn't reproduce any of your issues. Could you please post here or send us to universal.tools.contact@gmail.com the contents of Assets/UTNotifications/Resources/UTNotificationsSettings.asset and a list of files in Assets/Plugins/Android/UTNotificationsRes/res/raw? Please also send the complete json payloads of FCM messages you're sending. Best regards, |
hi ! Problem on : ok with I will try on other devices... |
Hi @ate864 , Thank you for the details provided. Could you please create a sample Unity project reproducing that issue, and send it us to universal.tools.contact@gmail.com, so we could research it? Please also send the exact FCM message payload you're sending. Unfortunately we don't have any Galaxy Tab tablets available to test with, but we could do some more testing in order to figure out what's going on. Best regards, |
Hi @ate864 , |
Hi ! |
Hi, I am Alex, an user of the asset named "UTNotifications - Professional Local & Push Notification Plugin" |
@AlexRudenko50 , Best regards, |
Thanks for your reply.
Your info is very helpful for my work.
If I have to set the badge when app closed, what I have to do?
I want to set badge to show the count of received notifications when app
was closed.
I saw the Manager.Instance.SetBadge function in the c# code that you
provided and I tested it when app opened.
is it possible to set the badge when app was closed ?
I will thanks if you can teach me about it
Thanks
Regards
Alex
…On Sat, Nov 18, 2017 at 11:55 AM, yuriy-universal-ivanov < ***@***.***> wrote:
@AlexRudenko50 <https://github.com/alexrudenko50> ,
Hi Alex, I replied you be email:
No C# code can be called in Unity when the app is closed, so no, it's
impossible. In the same time, UTNotifications gather all the received
notifications while the app was not running and send them in a bunch to
OnNotificationsReceived event when initializing UTNotifications.Manager
next time your app starts (please note, that you'll have to subscribe to
this event before calling Initialize to be able to handle these
notifications).
Best regards,
Yuriy, Universal Tools team.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#56 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AY74cbONf9wpij12x9h0JNmp3X_PZfb8ks5s3zYogaJpZM4NZIRE>
.
|
And you wrote me like followed
UTNotifications gather all the received notifications while the app was
not running and send them in a bunch to OnNotificationsReceived event when
initializing UTNotifications.Manager next time your app starts (please
note, that you'll have to subscribe to this event before calling Initialize
to be able to handle these notifications).
It means that the code must be written like below
Manager notificationsManager = Manager.Instance;
notificationsManager.OnSendRegistrationId += onTokenReceived;
notificationsManager.OnNotificationClicked +=
OnNotificationClicked;
notificationsManager.OnNotificationsReceived +=
OnNotificationsReceived; //Let's handle incoming notifications (not only
push ones)
Initialize();
Yes. I have wrote it as you mentioned.
But when my app launching, OnNotificationsReceived is not called and I can
not get received notifications during app is not running.
I will thanks if you can inform me about it
Thanks
Alex
On Sun, Nov 19, 2017 at 2:46 AM, Alex Rudenko <alexmobileapps50@gmail.com>
wrote:
… Thanks for your reply.
Your info is very helpful for my work.
If I have to set the badge when app closed, what I have to do?
I want to set badge to show the count of received notifications when app
was closed.
I saw the Manager.Instance.SetBadge function in the c# code that you
provided and I tested it when app opened.
is it possible to set the badge when app was closed ?
I will thanks if you can teach me about it
Thanks
Regards
Alex
On Sat, Nov 18, 2017 at 11:55 AM, yuriy-universal-ivanov <
***@***.***> wrote:
> @AlexRudenko50 <https://github.com/alexrudenko50> ,
> Hi Alex, I replied you be email:
> No C# code can be called in Unity when the app is closed, so no, it's
> impossible. In the same time, UTNotifications gather all the received
> notifications while the app was not running and send them in a bunch to
> OnNotificationsReceived event when initializing UTNotifications.Manager
> next time your app starts (please note, that you'll have to subscribe to
> this event before calling Initialize to be able to handle these
> notifications).
>
> Best regards,
> Yuriy, Universal Tools team.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#56 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AY74cbONf9wpij12x9h0JNmp3X_PZfb8ks5s3zYogaJpZM4NZIRE>
> .
>
|
Hi @AlexRudenko50, First, about badges. You have 2 options basically:
Now, regarding OnNotificationsReceived. Please note, that first of all, it's impossible on iOS, as mentioned in the documentation:
Second, please don't forget to specify that you're going to listen for received notifications in the first argument of UTNotifications.Manager.Instance.Initialize. Best regards, |
Thanks for your reply.
I have read all your info carefully and understood all things.
but the strange things is just that I can not get all received
notifications list on android.
I didn't forget to add the UTNotifications.Manager.Instance.Initialize
<http://universal-tools.github.io/UTNotifications/html_1.6.1/class_u_t_notifications_1_1_manager.html#a28a9bf7ff17111ac92be35c2d34395a8>
function
and parameter.
public static void Initialize()
{
Manager notificationsManager = Manager.Instance;
bool result = notificationsManager.Initialize(true, 0, true);
Debug.Log("UTNotifications Initialize: " + result);
m_notificationsEnabled =
notificationsManager.NotificationsEnabled();
notificationsManager.SetBadge(0);
}
I have tested it on several android devices, but I can not get the received
notification list when app is started.
Looking forward to your reply.
Best
Alex
…On Sun, Nov 19, 2017 at 2:51 PM, yuriy-universal-ivanov < ***@***.***> wrote:
Hi @AlexRudenko50 <https://github.com/alexrudenko50>,
First, about badges. You have 2 options basically:
1. Choose a badge number in advance, when scheduling a local
notification. Most likely, 1 will do as just an indication that there is
something unread.
2. Instead of using scheduled notifications, send push notifications
from your server. Then the server is responsible for counting unread
events, and every time you start an app, you'd inform your server to clear
that list for this specific user. It's much more complicated way.
It's very unfortunate that there is no simpler way to achieve what
you'd like on iOS.
Now, regarding OnNotificationsReceived. Please note, that first of all,
it's impossible on iOS, as mentioned in the documentation
<http://universal-tools.github.io/UTNotifications/html_1.6.1/class_u_t_notifications_1_1_manager.html#aff9bd679b8602eded21c9624469dd17a>
:
iOS doesn't provide a list of all notifications shown when an app wasn't
running in foreground. This list will contain only a notification, which
was clicked and all notifications shown when an app is running in
foreground. On other platforms, you'll receive a list of all shown
notifications.
Second, please don't forget to specify that you're going to listen for
received notifications in the first argument of UTNotifications.Manager.
Instance.Initialize
<http://universal-tools.github.io/UTNotifications/html_1.6.1/class_u_t_notifications_1_1_manager.html#a28a9bf7ff17111ac92be35c2d34395a8>
.
Best regards,
Yuriy, Universal Tools team.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#56 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AY74cYh3gWM1WOVd0zWKX_Suc-Yut-x-ks5s4LEEgaJpZM4NZIRE>
.
|
The problem is that the OnNotificationsReceived function is not called
after initialize.
On Sun, Nov 19, 2017 at 9:41 PM, Alex Rudenko <alexmobileapps50@gmail.com>
wrote:
… Thanks for your reply.
I have read all your info carefully and understood all things.
but the strange things is just that I can not get all received
notifications list on android.
I didn't forget to add the UTNotifications.Manager.Instance.Initialize
<http://universal-tools.github.io/UTNotifications/html_1.6.1/class_u_t_notifications_1_1_manager.html#a28a9bf7ff17111ac92be35c2d34395a8> function
and parameter.
public static void Initialize()
{
Manager notificationsManager = Manager.Instance;
bool result = notificationsManager.Initialize(true, 0, true);
Debug.Log("UTNotifications Initialize: " + result);
m_notificationsEnabled = notificationsManager.
NotificationsEnabled();
notificationsManager.SetBadge(0);
}
I have tested it on several android devices, but I can not get the
received notification list when app is started.
Looking forward to your reply.
Best
Alex
On Sun, Nov 19, 2017 at 2:51 PM, yuriy-universal-ivanov <
***@***.***> wrote:
> Hi @AlexRudenko50 <https://github.com/alexrudenko50>,
>
> First, about badges. You have 2 options basically:
>
> 1. Choose a badge number in advance, when scheduling a local
> notification. Most likely, 1 will do as just an indication that there is
> something unread.
> 2. Instead of using scheduled notifications, send push notifications
> from your server. Then the server is responsible for counting unread
> events, and every time you start an app, you'd inform your server to clear
> that list for this specific user. It's much more complicated way.
> It's very unfortunate that there is no simpler way to achieve what
> you'd like on iOS.
>
> Now, regarding OnNotificationsReceived. Please note, that first of all,
> it's impossible on iOS, as mentioned in the documentation
> <http://universal-tools.github.io/UTNotifications/html_1.6.1/class_u_t_notifications_1_1_manager.html#aff9bd679b8602eded21c9624469dd17a>
> :
>
> iOS doesn't provide a list of all notifications shown when an app wasn't
> running in foreground. This list will contain only a notification, which
> was clicked and all notifications shown when an app is running in
> foreground. On other platforms, you'll receive a list of all shown
> notifications.
>
> Second, please don't forget to specify that you're going to listen for
> received notifications in the first argument of
> UTNotifications.Manager.Instance.Initialize
> <http://universal-tools.github.io/UTNotifications/html_1.6.1/class_u_t_notifications_1_1_manager.html#a28a9bf7ff17111ac92be35c2d34395a8>
> .
>
> Best regards,
> Yuriy, Universal Tools team.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#56 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AY74cYh3gWM1WOVd0zWKX_Suc-Yut-x-ks5s4LEEgaJpZM4NZIRE>
> .
>
|
Just checked with UTNotifications 1.6.3: all received notifications while the app is closed are listed in OnNotificationsReceived on Android (f.e. 5.1). Could you please send us to universal.tools.contact@gmail.com a sample application reproducing the issue with exact steps to reproduce it? Thanks. Best regards, |
Hello, i created 5 profiles (just with custom sound .wav file) but when i send a notification (i set up a php serveur notification sender, with profile parameter selectable ) only the sound of first profile in utnotification settings window work. i try to set each of them in top list and they all work if they are in top, but not in other position... what i'm missing? (also, no fall back on the defaut profile when they don't work)
I only try on android for now...
Thank you!
The text was updated successfully, but these errors were encountered: