Unity-Technologies/com.unity.mobile.notifications

CancelNotification waits untill all notifications are scheduled before returning

abogarsukov-braingames opened this issue · 1 comments

Hello,

We schedule a lot of notifications in our app (300+). This works fine for us as the actual job is handled on a background thread. One thing that seems odd is CancelNotification implementation. If notifications thread is not completed at the time of the call, it waits for it holding the caller thread (which is main). We observe 5-10 second locks on modern devices because of this.

I believe it should add the task into some kind of a queue in this case and return instantly.

Platform: iOS/Android
Package version: 2.2.2
Unity version: 2021.3.28

Cancelling notification does queue an operation as well:

If you feel it's a bug in notifications package, please submit a bug using Unity Editor with a repro project for us to investigate.