Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

[RELEASED] UTNotifications - Professional Cross Platform Push Notifications and More

Discussion in 'Assets and Asset Store' started by Yuriy-Ivanov, Jun 12, 2015.

  1. TheVMan

    TheVMan

    Joined:
    Jun 29, 2017
    Posts:
    8
    I have an unusual bug. I think. I have been working with UTNotifications for months version 1.7.3. Everything was working fine. I moved our servers to our live AWS system and we have been preparing for a LIVE build everytime I run the APP iOS & android, it does not send me a device ID. I traced the code and it skips the callback function on init as far as I can tell. When we build and ran directly in XCode tethered to a phone, then it would send a Device ID. I updated to 1.8.2 and the same thing happens on the build downloaded from test flight. Is there any special setup for a live build that I'm missing? All other setting remain unchanged.
     
  2. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    495
    Hi @TheVMan ,

    Can you please check a few things for me?
    1. If Push Notifications capability got enabled in xcode (it should be done automatically):
    upload_2019-7-29_20-15-5.png
    2. If you subscribe to OnPushRegistrationFailed event, is it invoked instead of OnSendRegistrationId (as with OnSendRegistrationId, you must subscribe to it before initializing the UTNotifications manager)? If so, what error message does it provide?

    Thank you and best regards,
    Yuriy, Universal Tools team.
     
  3. TheVMan

    TheVMan

    Joined:
    Jun 29, 2017
    Posts:
    8
    Yuriy,

    Thanks for the quick reply. Push Notifications was active and on. I added the OnPushRegistrationFailed event and compiled and pushed to TestFlight, expecting an error message. However, everything worked on the iOS this time. I will keep you posted should I see this issue again. No other changes were made, so its a bit confusing. :)
     
  4. MaxSchluetz

    MaxSchluetz

    Joined:
    Aug 1, 2019
    Posts:
    2
    Hello,
    I'm facing a problem with the UTNotifications Plugin. Maybe someone can help me.

    I'm using the AdMob SDK, the Facebook SDK, and the Firebase Analytics SDK. They work properly together. After adding the UTNotifications Plugin the app crashes, but only when the app is started the first time after installation. This is the log:

    08-01 11:47:57.641 17307 17369 E Unity : [EGL] Failed to create window surface: EGL_BAD_ALLOC: EGL failed to allocate resources for the requested operation.
    08-01 11:47:57.641 17307 17369 E Unity :
    08-01 11:47:57.641 17307 17369 E Unity : (Filename: ./Runtime/GfxDevice/egl/WindowContextEGL.cpp Line: 150)
    08-01 11:47:57.641 17307 17369 E Unity :
    08-01 11:47:57.642 17307 17369 I Unity : Skipped rendering frame because GfxDevice is in invalid state (device lost)
    08-01 11:47:57.642 17307 17369 I Unity :
    08-01 11:47:57.642 17307 17369 I Unity : (Filename: Line: 803)
    08-01 11:47:57.642 17307 17369 I Unity :
    08-01 11:47:57.643 563 615 E BufferQueueProducer: [SurfaceView - com.awesomeprototype.season19/com.unity3d.player.UnityPlayerActivity] query: BufferQueue has been abandoned
    08-01 11:47:57.644 563 615 E BufferQueueProducer: [SurfaceView - com.awesomeprototype.season19/com.unity3d.player.UnityPlayerActivity] query: BufferQueue has been abandoned
    08-01 11:47:57.644 563 615 E BufferQueueProducer: [SurfaceView - com.awesomeprototype.season19/com.unity3d.player.UnityPlayerActivity] connect: BufferQueue has been abandoned

    When starting the app the second time it is running but as soon as a push notification is sent to the app it crashes again.
     
  5. essoperagma

    essoperagma

    Joined:
    Dec 1, 2016
    Posts:
    6
    Hi @Yuriy-Ivanov,
    I am having the same issue mentioned above. I have been able to produce it in two devices: Samsung Galaxy S6 Edge (Android 7.0) and Samsung Galaxy Tab A (Android 7.1.1). It seems to be working fine on Asus Zenfone 5 (Android 5.0).

    I tried a colored icon. The icon was displayed with colors, not white. So I believe this is not a tinting issue. White color comes from the input image. Notification icons of other apps are correctly tinted (Firefox file download notification, for instance).

    Thanks for help.
     
  6. outthinking01

    outthinking01

    Joined:
    Sep 22, 2014
    Posts:
    9
    Hi @Yuriy-Ivanov,
    In some android versions example: android 4.4.2 after restarting device, ScheduleNotificationRepeating() not working.. i mentioned
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> in android manifest & checked it in UT notification settings also... but still it is not working.. how can i solve this issue? & is it possible to know how many Schedule Notifications have been set from any of the call back methods?
     
  7. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    495
    Hi @MaxSchluetz,

    I definitely need more details (the error message you've posted has no relation to UTNotification at least directly), such as:
    1. Your version of UTNotifications.
    2. You version of Unity.
    3. What Android versions and what devices are affected.
    4. Sample Unity project reproducing the issue and specific steps to reproduce it.

    Update: please also check this post https://forum.unity.com/threads/rel...ications-and-more.333045/page-17#post-4777697. It can be your issue too (but there should be a different error in your LogCat log in that case - see the post for more details).

    Best regards,
    Yuriy, Universal Tools team.
     
    Last edited: Aug 4, 2019
  8. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    495
    Hi @essoperagma,

    Similar with the above, I need more details.
    1. Your version of UTNotifications.
    2. Is it local or push notifications?
    3. If second, I need a Json Payload your server sends to Firebase servers.
    4. The white+transparent notification icon you've configured in your notification profile settings.

    Best regards,
    Yuriy, Universal Tools team.
     
  9. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    495
    Hi @outthinking01,

    Android 4.x doesn't deliver RECEIVE_BOOT_COMPLETED to applications that are installed to the SD card. There is no good way to restore scheduled notifications in that case in a totally safe manner.

    > is it possible to know how many Schedule Notifications have been set from any of the call back methods
    Not sure if I understand what you mean here, but subscribing to OnNotificationsReceived before initializing the manager gives you a complete list of shown notifications (if any) since the last time OnNotificationsReceived was invoked.
    Maybe you're asking about another thing, I'm not sure: there is also a way to get the list of still scheduled notifications. See UTNotifications.Manager.Instance.ScheduledNotifications.

    Best regards,
    Yuriy, Universal Tools team.
     
  10. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    495
    Hi @TheVMan,

    Thank you for the update, please let me know if the issue ever returns, I'll try to help you find our what goes wrong.

    Best regards,
    Yuriy, Universal Tools team.
     
  11. outthinking01

    outthinking01

    Joined:
    Sep 22, 2014
    Posts:
    9
    Hi @Yuriy-Ivanov,
    Thanks for your reply., this is what i was looking for to get the list of still scheduled notifications.
    Sorry but i am not getting how to use it in code.. if i try to use the above line means i am getting error as "Manager does not contain a definition for ScheduledNotifications" like that.. so how can i implement this ?
    In android 4.x, if scheduled notifications are not restored means i am thinking to reschedule it one more time by checking the list of still scheduled notifications..
    so pls help me to implement UTNotifications.Manager.Instance.ScheduledNotifications.
     
  12. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    495
    > if i try to use the above line means i am getting error as "Manager does not contain a definition for ScheduledNotifications" like that
    It means you're on obsolete version of UTNotifications. Upgrade to the latest one.
    Well, rescheduling based on UTNotifications.Manager.Instance.ScheduledNotifications will work of course, but... When do you want to do it considering the fact that you can't handle the event of system reboot? When your app is started again only? As for me, it's pretty useless. It's up to you of course, but taking into account the market share of Android 4.x (less than 5%), and even much less among gamers, it can be just easier to ignore restoring notifications on device reboot on Android 4.x if your app is installed into SD card instead of internal device memory.

    Best regards,
    Yuriy, Universal Tools team.
     
  13. TheVMan

    TheVMan

    Joined:
    Jun 29, 2017
    Posts:
    8
    Okay, The iOS works perfectly, but Android is not working at all. Version 1.8.2 of UTNotifications, Unity 2019.1.7.
    bool initialized = UTNotifications.Manager.Instance.Initialize(true, 0, false);

    Initialized is always returning false, so I never get the registratrionID. We have moved from a closed beta to an open beta.
     
  14. outthinking01

    outthinking01

    Joined:
    Sep 22, 2014
    Posts:
    9
    Hi @Yuriy-Ivanov,
    I just updated to latest plugin.. , in the first app launch after initializing UT notification plugin i am getting Manager.Instance.ScheduledNotifications.Count as 0, but from the next launch on wards i am getting following error.. is thier anything wrong i am doing?..

    E/Unity ( 5380): Exception: JSON Parse: Quotation marks seems to be messed up.
    E/Unity ( 5380): at UTNotifications.JSONNode.Parse (System.String aJSON) [0x00000] in <filename unknown>:0
    E/Unity ( 5380): at UTNotifications.JSON.Parse (System.String aJSON) [0x00000] in <filename unknown>:0
    E/Unity ( 5380): at UTNotifications.Manager.LoadScheduledNotifications () [0x00000] in <filename unknown>:0
    E/Unity ( 5380): at UTNotifications.Manager.Initialize (Boolean willHandleReceivedNotifications, Int32 startId, Boolean incrementalId) [0x00000] in <filename unknown>:0
    E/Unity ( 5380): UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
    E/Unity ( 5380): UnityEngine.DebugLogHandler:LogException(Exception, Object)
    E/Unity ( 5380): UnityEngine.Logger:LogException(Exception, Object)
    E/Unity ( 5380): UnityEngine.Debug:LogException(Exception)
    E/Unity ( 5380): UTNotifications.Manager:Initialize(Boolean, Int32, Boolean)
    E/Unity ( 5380): Notification:Initialize()
     
  15. afedulov

    afedulov

    Joined:
    Aug 6, 2019
    Posts:
    2
    Hi. We migrated for unity 5.6 to unity 2019.1 and faced next problem during xcode project compilation:

    Code (CSharp):
    1. [11:38:19]    [Step 6/8] Undefined symbols for architecture armv7:
    2. [11:38:19]    [Step 6/8]   "OBJC_CLASS$_UNNotificationAttachment", referenced from:
    3. [11:38:19]    [Step 6/8]       objc-class-ref in libOneSignal.a(OneSignalHelper.o)
    4. [11:38:19]    [Step 6/8]   "OBJC_CLASS$_UNNotificationRequest", referenced from:
    5. [11:38:20]    [Step 6/8]       objc-class-ref in libOneSignal.a(OneSignalHelper.o)
    6. [11:38:20]    [Step 6/8]   "OBJC_CLASS$_UNTimeIntervalNotificationTrigger", referenced from:
    7. [11:38:20]    [Step 6/8]       objc-class-ref in libOneSignal.a(OneSignalHelper.o)
    8. [11:38:21]    [Step 6/8]   "OBJC_CLASS$_UNNotificationSound", referenced from:
    9. [11:38:21]    [Step 6/8]       objc-class-ref in libOneSignal.a(OneSignalHelper.o)
    10. [11:38:22]    [Step 6/8]   "OBJC_CLASS$_UNUserNotificationCenter", referenced from:
    11. [11:38:22]    [Step 6/8]       objc-class-ref in libOneSignal.a(OneSignalHelper.o)
    12. [11:38:22]    [Step 6/8]   "OBJC_CLASS$_UNNotificationCategory", referenced from:
    13. [11:38:23]    [Step 6/8]       objc-class-ref in libOneSignal.a(OneSignalHelper.o)
    14. [11:38:23]    [Step 6/8]   "OBJC_CLASS$_UNNotificationServiceExtension", referenced from:
    15. [11:38:23]    [Step 6/8]       OBJC_CLASS$_NotificationService in NotificationService.o
    16. [11:38:24]    [Step 6/8]   "OBJC_CLASS$_UNNotificationAction", referenced from:
    17. [11:38:24]    [Step 6/8]       objc-class-ref in libOneSignal.a(OneSignalHelper.o)
    18. [11:38:25]    [Step 6/8]   "OBJC_CLASS$_UNMutableNotificationContent", referenced from:
    19. [11:38:25]    [Step 6/8]       objc-class-ref in libOneSignal.a(OneSignalHelper.o)
    20. [11:38:25]    [Step 6/8]   "OBJC_METACLASS$_UNNotificationServiceExtension", referenced from:
    21. [11:38:26]    [Step 6/8]       OBJC_METACLASS$_NotificationService in NotificationService.o
    22. [11:38:27]    [Step 6/8] ld: symbol(s) not found for architecture armv7
    23. [11:38:27]    [Step 6/8] clang: error: lin
    Can you help please? UTNotification version is 1.8.1 . Xcode version 10.1
     
    Last edited: Aug 6, 2019
  16. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    495
    Hi @TheVMan,

    Returning false from UTNotifications.Manager.Instance.Initialize in Android means that you're either missing required Android libraries or there are cross-assets Android libraries conflicts.
    First please check if it's your case maybe: https://forum.unity.com/threads/rel...ications-and-more.333045/page-17#post-4777697.
    If not, please send me the list of all files and folders in your Assets/Plugins/Android. Besides, please check Android LogCat logs, there should be an error messaging with appropriate native (Java) stacktrace present on invocation of UTNotifications.Manager.Instance.Initialize - please send me the entire message.

    Best regards,
    Yuriy, Universal Tools team.
     
  17. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    495
    Hi @outthinking01,
    That's interesting. Can you please send me what notification(s) you scheduled after the first start, specifically their titles, texts and, if any, user data keys and values. Something went wrong when serializing/deserializing scheduled notifications, but without more details I can't really tell more.
    Cleaning the app data in the app settings will help you avoid this error next time you start the app, but of course the main issue has to be fixed: I'll be really glad to know a way to reproduce it so we could issue a fix for you and potentially others.

    Best regards,
    Yuriy, Universal Tools team.
     
  18. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    495
    Hi @afedulov,

    It's not UTNotifications, it's OneSignal. Please contact their support.

    Best regards,
    Yuriy, Universal Tools team.
     
  19. afedulov

    afedulov

    Joined:
    Aug 6, 2019
    Posts:
    2
    Thank you, we'll try.
     
  20. MaxSchluetz

    MaxSchluetz

    Joined:
    Aug 1, 2019
    Posts:
    2
    Hi @Yuriy-Ivanov,

    the post you linked solved my problems.

    Thank you very much for helping!
    Best,
    Max
     
  21. outthinking01

    outthinking01

    Joined:
    Sep 22, 2014
    Posts:
    9
    Hi @Yuriy-Ivanov,
    I observed this exception only in android 4.2.2 version, i was using escaped unicodes along with title & text...
    Example with exception is as follows:
    title as "Some string"
    text as "Some content"+ " \ud83e\udd58"
    Got error as:
    E/Unity (24967): Exception: JSON Parse: Quotation marks seems to be messed up.
    E/Unity (24967): at UTNotifications.JSONNode.Parse (System.String aJSON) [0x00000] in <filename unknown>:0
    E/Unity (24967): at UTNotifications.JSON.Parse (System.String aJSON) [0x00000] in <filename unknown>:0
    E/Unity (24967): at UTNotifications.Manager.LoadScheduledNotifications () [0x00000] in <filename unknown>:0
    E/Unity (24967): at UTNotifications.Manager.Initialize (Boolean willHandleReceivedNotifications, Int32 startId, Boolean incrementalId) [0x00000] in <filename unknown>:0
    E/Unity (24967): UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
    E/Unity (24967): UnityEngine.DebugLogHandler:LogException(Exception, Object)
    E/Unity (24967): UnityEngine.Logger:LogException(Exception, Object)
    E/Unity (24967): UnityEngine.Debug:LogException(Exception)
    E/Unity (24967): UTNotifications.Manager:Initialize(Boolean, Int32, Boolean)
    E/Unity (24967): UTNotifications.UTNotificationsSample:Initialize()
    E/Unity (24967): UnityEngine.Events.InvokableCall:Invoke()
    E/Unity (24967): UnityEngine.Events.UnityEvent:Invoke()
    E/Unity (24967): UnityEngine.UI.Button:press()
    E/Unity (24967): UnityEngine.UI.Button:OnPointerClick(PointerEventData)
    E/Unity (24967): UnityEngine.EventSystems.Execut
    W/Unity (24967): UTNotifications: Initialization failed!

    here i was passing user data also but i don't think as it is creating problem., because i tried to debug this exception in depth by building lot of times & i think finally i came to know the problem as, this exception might be coming because of using escaped unicodes..
    As i seen "Quotation marks seems to be messed up", i started playing with quotation marks, so finally i made changes as below and the exception just gone away.
    Example of working code is as follows:
    title as "Some string"
    text as "Some content"+ " \ud83e\udd58 "
    here after using escaped unicode i just left one blank space as u can see & it started working fine... may be this information might help you to debug this exception...
     
    Yuriy-Ivanov likes this.
  22. Ordynskiy

    Ordynskiy

    Joined:
    Aug 7, 2019
    Posts:
    1
    @Yuriy-Ivanov, приветствую вас! У нас в крашлитике иногда бывает ошибка
    FormatException: Invalid format.
    System.Double.Parse (System.String s, NumberStyles style, IFormatProvider provider)
    UTNotifications.ScheduledNotification..ctor (UTNotifications.JSONNode json)..
    .
    Хотел бы спросить, могли ли мы неправильно использовать плагин, что привело к этой ошибке. Если да - куда смотреть? Если нет, возможен ли фикс от вас? В код из package изменений не вносили.

    Ошибка в этом месте
    Code (CSharp):
    1.  
    2. /// <summary>
    3. /// Initializes a new instance of the <see cref="T:UTNotifications.ScheduledNotification"/> class.
    4. /// </summary>
    5. /// <param name="json">Notification json.</param>
    6. public ScheduledNotification(JSONNode json)
    7.     : base(json)
    8. {
    9.     this.triggerDateTime = !(json["triggerDateTime"] is JSONLazyCreator) DateTime.Parse(json["triggerDateTime"].Value) : TimeUtils.UnixTimestampMillisToDateTime(double.Parse(json["triggerAtSystemTimeMillis"].Value));
    10. }
     
    Last edited: Aug 8, 2019
  23. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    495
    Здравствуйте, @Ordynskiy.

    Было бы очень здорово узнать путь для воспроизведения данной проблемы - у нас такой проблемы никогда не было насколько мне извесно.

    Best regards,
    Yuriy, Universal Tools team.
     
  24. korchuk

    korchuk

    Joined:
    Jun 15, 2018
    Posts:
    3
    Hi @Yuriy-Ivanov

    We are trying to optimize our push notifications on Android. To that end we'd like to track all received notification events.
    Is there a way to detect if any of notifications provided to "OnNotificationsReceived" callback were suppressed by the "WHEN_CLOSED_OR_IN_BACKGROUND" flag? This will allow to track the notifications that were actually displayed to the user.

    Cheers
     
  25. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    495
    Hi @korchuk,

    You'll have to modify the Android native plugin to achieve that. All received FCM messages are handled in Assets/UTNotifications/Editor/Android/NativePluginSource/utnotifications/src/main/java/universal/tools/notifications/FCMService.java. Any filtering is applied later, in Manager.postPushNotification.
    In order to build the native plugin, please see https://forum.unity.com/threads/rel...ications-and-more.333045/page-13#post-3533532.

    Best regards,
    Yuriy, Universal Tools team.
     
  26. korchuk

    korchuk

    Joined:
    Jun 15, 2018
    Posts:
    3
    Thanks for a quick reply! That helped a lot!
     
  27. TheVMan

    TheVMan

    Joined:
    Jun 29, 2017
    Posts:
    8
    After much fighting and hair pulling. I finally was able to make a build using AndroidX with no errors. Everything seems to work, except UTNotifications. I followed all the instructions on 4777797 post, and its reference as well (where you add the androidx line in the conditional statement). I'm still getting a false on Initialize. When I look at LogCat, UTNotifications is nowhere to be found. All my other plugins are found and registered, UT is missing completely from the logs?

    Now using Unity 2019.2.0. and Androidx libs.
     
  28. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    495
    Can you please provide a few more details?
    1. What's the target device you're testing it against and what Android version is it running?
    2. Please try to start your app completely (so LogCat is not populated with lots of initialization related logs) and then after a while call UTNotifications.Manager.Instance.Initialize, f.e. by a button click (it's OK to call it second time too). In parallel, please open a LogCat window. Please check if anything is printed there (without any filters). Returning false from Initialize must print something into LogCat.
    3. Please send a list of all files and folders in your Assets/Plugins/Android.

    Best regards,
    Yuriy, Universal Tools team.
     
  29. rajeshblueleaf

    rajeshblueleaf

    Joined:
    Aug 16, 2019
    Posts:
    1
    We are using a background service in our Android APP abd we are not able to succeed with existing methods like alarm manager, job Scheduler, Work manager and fore ground services, FCM and GCM Notifications , we want to know if UTNotification will solve our problems. Thanks in Advance
     
  30. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    495
    Absolutely not enough information from you. What you want to achieve (i.e. to succeed doing what), why exactly each of other methods fails - without these details I can't really tell if UTNotifications is a good solution for you or not.
    Please note, that internally UTNotificartions relies on AlarmManager (for local notifications) and FCM (for push notifications) in Android.
    You might take a look at UTNotifications manual, it clearly explains what UTNotifications can and how you achieve it: http://universal-tools.github.io/UTNotifications/Manual_1.8.pdf

    Best regards,
    Yuriy, Universal Tools team.
     
  31. rajesh_desai_2000

    rajesh_desai_2000

    Joined:
    Aug 17, 2019
    Posts:
    2
     
  32. rajesh_desai_2000

    rajesh_desai_2000

    Joined:
    Aug 17, 2019
    Posts:
    2
    Hi,
    We are using a background service in our Android APP abd we are not able to succeed with existing methods like alarm manager, job Scheduler, Work manager and fore ground services, FCM and GCM Notifications , we want to know if UTNotification will solve our problems. Thanks in Advance

    We are using the background services say every 10 minutes to do a particular task like adding some info in the remote server, which works fine in all the mobiles except chinese mobiles like oppo , vivo etc. The App is killed once it is removed from the tray or closed and none of the Background services work and we want to know if UTNotification will solve our problems.
     
  33. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    495
    Thanks @rajesh_desai_2000, it's clear now. No, UTNotifications won't help you either. These (mostly cheap) Android devices are known to force-kill applications that don't have any active Activities, except of some built-in applications and popular messengers that are white-listed in these devices. It's done to save their very limited power. By design, Android stops anything that force-stopped applications could do otherwise, including receiving, handling or displaying notifications, until the app is restarted by user manually. This is exactly how these devices save power.

    Best regards,
    Yuriy, Universal Tools team.
     
  34. rdagosto

    rdagosto

    Joined:
    Feb 13, 2018
    Posts:
    1
    Does it work with .NET 4.x?
     
  35. TheVMan

    TheVMan

    Joined:
    Jun 29, 2017
    Posts:
    8
    I think we may have resolved this. Will keep you posted. It looks like when we were upgrading to AndroidX and all that went with it. The UTNotificaions.aar file went missing. Have no idea how. We re-imported UT and it seams like that fixed the issue. :) Thanks for your help, as always.
     
    Yuriy-Ivanov likes this.
  36. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    495
    Yes.
     
  37. greymag

    greymag

    Joined:
    Oct 2, 2017
    Posts:
    6
    Hi, @Yuriy-Ivanov

    I have a problem with using UTNotifications for Android in Unity 2019.2.0

    When I launch application on device, on every extension call (for example Manager.Instance.NotificationsAllowed()) - I got exception in console: "AndroidJavaException: java.lang.NoClassDefFoundError: android.support.v4.app.NotificationManagerCompat"

    I did add issue on GitHub https://github.com/universal-tools/UTNotificationsFeedback/issues/113 and send simple empty project with UTNotification attached on email.
     
  38. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    495
    Hi @greymag,

    I've briefly reviewed the project you've sent (btw, thank you a lot for that, it really helps). You seem to have incompatible versions of Android libraries imported in your project (or AndroidX libraries enabled in Play Services Resolver settings while using AndroidX-conflicting versions of Android libraries). Fortunately, the fix should be pretty simple: see https://forum.unity.com/threads/rel...ications-and-more.333045/page-17#post-4777697. Please let me know if it doesn't help, I'll try to reproduce and research your issue deeper using the demo project you've sent (though it may take a little more time then).

    Best regards,
    Yuriy, Universal Tools team.
     
  39. greymag

    greymag

    Joined:
    Oct 2, 2017
    Posts:
    6
    Thanks. Solution doesn't help. Post reply on GitHub.
     
  40. Inspekt

    Inspekt

    Joined:
    Aug 11, 2015
    Posts:
    4
    Hi @Yuriy-Ivanov. I would like to ask for what reasons you have 3 "Editor" folders in UTNotifications project. It's not really conveniently when you try to put UTNotifications into assembly because you need to create one assembly for each "Editor" folder. So it will be 4 assemblies for whole folder. Is it possible to put all editor-dependency scripts in one Editor folder? Thank you.
     
  41. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    495
    Hi @greymag ,

    I replied to you on GitHub. Please let me know if you need any further assistance with that issue.

    Best regards,
    Yuriy, Universal Tools team.
     
  42. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    495
    There is no hidden reason: the code is just located where it logically belongs, f.e. iOS related Editor scripts are under .../iOS/ and so on. Feel free to rearrange the editor scripts as you prefer (but make sure to do the same next time you import a future update of the asset).

    Best regards,
    Yuriy, Universal Tools team.
     
  43. cabanel

    cabanel

    Joined:
    Sep 22, 2014
    Posts:
    66
    Hi, I have bought this library, I have apps on Android and IOS that already use firebase massaging
    now I would like to add a local message management.

    what do you advise me to do, let alone everything already done and working with firebase massaging or do I have to replace everything?
    Thanks
     
  44. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    495
    Hi @cabanel,

    UTNotifications should work alright alongside Firebase Unity SDK, including messaging, but don't enable FCM and APNS in UTNotifications settings, and also see https://forum.unity.com/threads/rel...ications-and-more.333045/page-17#post-4777697. Besides, handling received/clicked local notifications in iOS might not work as Google people broke built-in Unity functionality we rely on for that purpose in their Firebase SDK for Unity. Please let me know in case of any difficulties, I'll be glad to help.

    Best regards,
    Yuriy, Universal Tools team.
     
    Last edited: Sep 15, 2019
  45. cabanel

    cabanel

    Joined:
    Sep 22, 2014
    Posts:
    66
    hi,

    I'm using your demo to test automated restoring
    on Xiaomi mi 9T (one of the best-selling phones)
    notifications after restart are not restored.

    The same apk on xiaomi A2 phone and Samsung tablet works fine

    thanks
     
  46. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    495
    Hi @cabanel,

    Please see https://stackoverflow.com/questions/29627856/reboot-receiver-is-not-working-in-xiaomi-phones, I hope it helps.
    Please note that Xiaomi Mi A2 (as well as A1) is running a "vanilla" version of Android, this is why it works fine.

    Best regards,
    Yuriy, Universal Tools team.
     
  47. cabanel

    cabanel

    Joined:
    Sep 22, 2014
    Posts:
    66
    thanks,
    another questions:

    UTNotifications.Manager.Instance.ScheduleNotificationRepeating (60, 60, "Title", "Text", 1); // repeats every minute
    UTNotifications.Manager.Instance.ScheduleNotificationRepeating (60, 3600, "Title", "Text", 2); // repeats every hour
    UTNotifications.Manager.Instance.ScheduleNotificationRepeating (60, 86400, "Title", "Text", 3); // repeats every day
    UTNotifications.Manager.Instance.ScheduleNotificationRepeating (60, 604800, "Title", "Text", 4); // repeats every week

    is this code correct on IOS?

    or I can also do on IOS?

    UTNotifications.Manager.Instance.ScheduleNotification (new DateTime (2020, 12, 25, 10, 30, 50), title, text, 1, userData, notificationProfile, badgeNumber, buttons);
    UTNotifications.Manager.Instance.ScheduleNotification (new DateTime (2020, 12, 35, 10, 30, 50), title, text, 2, userData, notificationProfile, badgeNumber, buttons);
    UTNotifications.Manager.Instance.ScheduleNotification (new DateTime (2020, 12, 50, 10, 30, 50), title, text, 3, userData, notificationProfile, badgeNumber, buttons);


    do you know a forum where they explain the best techniques to take advantage of local notifications?

    thanks!
     
  48. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    495
    Hi @cabanel,

    You can do both ways in iOS, as well as in other supported platform. For repeating notifications in iOS there are only predefined intervals which are chosen by UTNotifications as closest to the requested number of seconds. All numbers correspond to existing iOS interval alright.
    Notification buttons are not supported in iOS and will be ignored.

    I'm not sure what kind of forum you mean and what kind of information on local notifications you're looking for, but UTNotifications documentation is contained in the manual and API Reference.
    Besides, you can always ask anything here or by email, I'll be glad to help.

    Best regards,
    Yuriy, Universal Tools team.
     
  49. cabanel

    cabanel

    Joined:
    Sep 22, 2014
    Posts:
    66
  50. neowedge

    neowedge

    Joined:
    May 6, 2014
    Posts:
    9
    Hi!

    Is there some way to create custom layouts in order to change background image? Something like this:

     
    Last edited: Sep 24, 2019
unityunity