Open abhaykap opened 5 years ago
Forgot to mention environment: We are testing on:
Android 8,
Unity 5.6.6f2
Hello, Another update:
As per suggestions of https://github.com/universal-tools/UTNotificationsFeedback/issues/91 if we don't include the {'notification': } key in the payload that we receive the notification with the bell icon rather than with the app icon. Please suggest the fix to have a proper app icon in the notification.
Hi @abhaykap ,
Sorry for a late reply. The icon is to be configured in a notification profile in UTNotifications settings in Unity. The profiles then can be specified when posting a local or push notifications. You can also configure a default profile to be used when no profile was specified.
Please see section "Using Notification Profiles (Sounds, Icons and Other Attributes)" of the manual for more details on notification profiles.
P.S. Please also note that using application icons for notifications is outdated, as Android starting with version 5 automatically replaces any non-transparent pixels of a notification icon with white (or contrast) color when targetting Android API 21 and newer. So you'll have to specify a white+transparent icon for your notification profile for it to work correctly.
Best regards, Yuriy, Universal Tools team.
@yuriy-universal-ivanov
I'm having the same issue and after using the following tool, instead of the bell icon I'm only seeing a square as the notification icon: https://romannurik.github.io/AndroidAssetStudio/icons-notification.html#source.type=image&source.space.trim=1&source.space.pad=0&name=ic_stat_notification_small
The icon I'm using is a .png with transparency and white areas.
Hi @Nyankoo ,
Please send your Assets/UTNotifications/Resources/UTNotificationsSettings.asset and the contents of folder Assets/Plugins/Android/UTNotificationsRes plus the way you show the notification (it's a call with all its arguments in case of local notifications and the complete json payload in case of push notifications) to universal.tools.contact@gmail.com, I'll check what exactly is wrong in your case.
Best regards, Yuriy, Universal Tools team.
@yuriy-universal-ivanov
I just checked the Assets/Plugins/Android/UTNotificationsRes folder and it seems old files are still in there. What files (with what names) should be in there?
@Nyankoo ,
You shouldn't touch that folder manually: its contents is updated by modifying appropriate notification profiles (and then hitting the "OK" button). UTNotifications' editor scripts are to take care of the rest. In case they failed to for whatever reason, please tell me what exactly you did step-by-step so we'll try to reproduce the issue. Then feel free to delete the incorrect notification profile and recreate it again (and don't forget to "OK" please).
@yuriy-universal-ivanov
I simply created a new profile, named it at set the icons. After that, I hit "Ok". It seems Unity 2018.3.8f is throwing an error when hitting "Ok" on the default profile, so maybe I will try to re-import the whole plugin.
It seems Unity 2018.3.8f is throwing an error when hitting "Ok" on the default profile, so maybe I will try to re-import the whole plugin.
That's obviously the problem. May I find out what's the error?
@yuriy-universal-ivanov
Hm, after creating the new profile, the error seemed to have disappeared. But both the new profile and the default one have the same settings.
The only things I have in my UTNotificationsRes folder are .png files of my custom profile and 2 of the three are outdated (knprofile.png & knprofile_android5plus.png). "knprofile" is the name of the cutom profile.
@Nyankoo ,
Not sure what exactly went wrong and whether the errors you had might have caused it. Please try doing these steps:
@yuriy-universal-ivanov
That worked!
After step 2, I got an error when reconfigure the default profile (see below), but that fixed itself apparently by waiting a bit. Unity didn't directly generate the UTNotificationsRes folder, so your script couldn't access it.
The error was:
NullReferenceException: Object reference not set to an instance of an object UTNotifications.Settings.GetAndroidResourceLibFolder (System.Boolean prepareResource) (at Assets/UTNotifications/Src/Settings.cs:760) UTNotifications.NotificationProfileDialog.Apply () (at Assets/UTNotifications/Editor/SettingsEditor.cs:666) UTNotifications.NotificationProfileDialog.OnOK () (at Assets/UTNotifications/Editor/SettingsEditor.cs:653) UTNotifications.NotificationProfileDialog.OnGUI () (at Assets/UTNotifications/Editor/SettingsEditor.cs:461)
@yuriy-universal-ivanov
That worked!
After step 2, I got an error when reconfigure the default profile (see below), but that fixed itself apparently by waiting a bit. Unity didn't directly generate the UTNotificationsRes folder, so your script couldn't access it.
The error was:
NullReferenceException: Object reference not set to an instance of an object UTNotifications.Settings.GetAndroidResourceLibFolder (System.Boolean prepareResource) (at Assets/UTNotifications/Src/Settings.cs:760) UTNotifications.NotificationProfileDialog.Apply () (at Assets/UTNotifications/Editor/SettingsEditor.cs:666) UTNotifications.NotificationProfileDialog.OnOK () (at Assets/UTNotifications/Editor/SettingsEditor.cs:653) UTNotifications.NotificationProfileDialog.OnGUI () (at Assets/UTNotifications/Editor/SettingsEditor.cs:461)
Thank you for those details, we'll research the issue and make sure it's fixed before releasing 1.8.
Hello,
We have recently upgraded the UTNotification plugin to 1.7.3 and after that, we had this callback issue https://github.com/universal-tools/UTNotificationsFeedback/issues/91 which is fixed. But we are having a new issues:
Please refer https://github.com/universal-tools/UTNotificationsFeedback/issues/91 for code and payload details.
Attached the UTNotification settings
Attached bell icon issue reference when app is in forground:![screenshot_2018-12-10-18-05-52](https://user-images.githubusercontent.com/3471426/49983129-c88a2f80-ff86-11e8-8374-0df8ad02c036.png)
Attached duplicate message issue reference:![screenshot_2018-12-04-10-14-35](https://user-images.githubusercontent.com/3471426/49983098-97a9fa80-ff86-11e8-93d5-0d4a2c2caf55.png)
Abhay