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

notification profile first one work only #56

Closed
ate864 opened this issue May 12, 2017 · 13 comments
Closed

notification profile first one work only #56

ate864 opened this issue May 12, 2017 · 13 comments

Comments

@ate864
Copy link

ate864 commented May 12, 2017

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!

@yuriy-universal-ivanov
Copy link

yuriy-universal-ivanov commented May 13, 2017

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,
Yuriy, Universal Tools team.

@ate864
Copy link
Author

ate864 commented May 17, 2017

hi !
Thank you for your help.
For information i try on another device and all works as expected... so the problem is more a compatibility problem (android version?, tablet? phone?)

Problem on :
samsung galaxy tab A - android 5.1.1
samsung galaxy tab 4 - android 4.4.4

ok with
phone honor 5c - android 7.0

I will try on other devices...

@yuriy-universal-ivanov
Copy link

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,
Yuriy, Universal Tools team.

@yuriy-universal-ivanov
Copy link

Hi @ate864 ,
Is it still an issue or were you able to solve it?

@ate864
Copy link
Author

ate864 commented Jul 17, 2017

Hi !
I don't work on this now.... and we published our app with the problem :)
we didn't have time to look at this... and this is not realy a big problem.

@AlexRudenko50
Copy link

Hi, I am Alex, an user of the asset named "UTNotifications - Professional Local & Push Notification Plugin"
When I closed my app, is it possible to know the received notification on my android device?
I have tested it on my devices several times, but I couldn't know about received notification when my app closed.
Looking forward to your reply
Best
Alex

@yuriy-universal-ivanov
Copy link

@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.

@AlexRudenko50
Copy link

AlexRudenko50 commented Nov 19, 2017 via email

@AlexRudenko50
Copy link

AlexRudenko50 commented Nov 19, 2017 via email

@yuriy-universal-ivanov
Copy link

yuriy-universal-ivanov commented Nov 19, 2017

Hi @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. See also https://stackoverflow.com/questions/31538995/will-ios-increment-a-push-notfication-badge-number for more details.

Now, regarding OnNotificationsReceived. Please note, that first of all, it's impossible on iOS, as mentioned in the documentation:

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.

Best regards,
Yuriy, Universal Tools team.

@AlexRudenko50
Copy link

AlexRudenko50 commented Nov 20, 2017 via email

@AlexRudenko50
Copy link

AlexRudenko50 commented Nov 20, 2017 via email

@yuriy-universal-ivanov
Copy link

@AlexRudenko50 ,

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,
Yuriy, Universal Tools team.

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

3 participants