A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Separate names with a comma.
Discussion in 'Android' started by _Paulius, Jan 28, 2019.
I see 1.5.0 is pushed as a commit on Unity's github
@Aurimas-Cernius Should we wait for the update in 2021?
Is it possible to add notification that repeats on daily basis using the sample project from Unity https://github.com/Unity-Technologies/NotificationsSamples ?
or is there any way I can repeat a notification on daily basis (without clicking buttons daily) using unity's builtin solution for Android? I can't find any example for it in docs @Aurimas-Cernius
Any update on this issue ?
I'm using unity 2020.3 and package 1.4.2. Still getting IOSNotificationCenter.GetLastRespondedNotification() always null
okay so i want to report a bug in AndroidNotificationPostProcessor.cs
you need to add
notificationRestartOnBootReceiver.SetAttribute("exported", kAndroidNamespaceURI, "false");
at line number 132 to add android:exported = "false" property in manifest
otherwise i can not upload build to play console. It is now compulsory for all activity, activity alias, service or broadcast receiver with intent filter to have android:exported property set. Please fix it and update asap because if i edit AndroidNotificationPostProcessor.cs, it reverts back to original state. for now i have to remove notifications package sadly
This issue is also mentioned in https://forum.unity.com/threads/mobile-notifications-package-and-android-12-issue.1225353/)
Thx for this note! Searched for several days for this issue until I found your post. Fixed the problem. Now I'm wondering when 1.5.0 will become available in the package manager since it was available since last month:
Would like to have the fix to not apply the patch everytime the PM needs to update.
Until they release a new update, you can try this to fix and it auto adds the required flag (android:exported flag)
Thanks, I moved the package to the local packages folder and adjusted the code there. Still annoying, as I now have to check now and then if the package has been released and I can move the folder back again.
@Aurimas-Cernius It's unbelievable how Unity is responsible for a plugin, and just leaves their users hanging for more than half a year...
Did you also change the AndroidManifest.xml under "project/androidnotifications/src/main/" in your workaround and when yes, could you please tell me how you did this?
No. All I did was to move the package out of the /Library/PackagesCache/ folder to the /Packages/ folder and adjusted the iOS .mm script. On Android I hadn't had problems so far.
For everyone who hasn't seen it already, version 2.0.0 is now available via the Package Manager.
Anyone knows how to use the new "AndroidNotificationCenter.CreateNotificationBuilder"? The docs sadly don't mention it.
Anybody know why im i getting this message?
Can't tell exactly without translation to language I understand, but a comment in code below and layout suggests you wrote the code inside a class, not inside a method.
After updating to 2.0.0 we're getting this exception on Android 4.4:
Is there something that can be done about it?
Another one - Android 9 and 11:
@imaginalis could you report both of them as bugs using Unity Editor with repro projects and information on devices, how to reproduce it?
Sorry, I'm not able to do that, these are logs from players' devices that I've found in Cloud Diagnostics. We haven't reproduced this on our side. First one though looks like some obvious issue on every Android 4.x device.
Hello, using unity 2020.3.20
I get this error ....
DirectoryNotFoundException: Could not find a part of the path ....\Library\PackageCache\firstname.lastname@example.org\Runtime\Android\Plugins\com\unity\androidnotifications\UnityNotificationManagerOreo.java
Try reinstalling the package. This looks like mess-up the project.
I did 3 times and try with just empty project, build worked , reinstalled into empty project build error again. the script is there, it shows in that directory, don't understand part of the path... no luck
Maybe the path is too long? On Windows you are limited to 259 chars.
I didn't set the path I just installed the package, should I move that one level up? and if I do so what will that trigger in return?... or should I just use different means of mobile notifications?
Look where your Unity project is located. Starting from word Library the path is almost 150 chars, so if you Unity project is in a directory those path exceeds 100 characters, you are in danger of having problems with path.
ok got it, I'll move, Thanks!
That's crazy yes that was the problem, haha how the avg. person suppose to know that... this don't happen with other packages do it? well complex but simple, resolve, thank you.
@Aurimas-Cernius Can you fix this issue I mentioned almost a month ago?
It's a simple one, you just need to make additional Android version checks in AndroidNotificationCenter class to make sure you don't request EXTRA_BIG_TEXT on Android 4. This issue is making thousands of exceptions for our Android 4 players.
Same issue, android 4.4 only
So according to https://github.com/Unity-Technologi...mmit/4f960d3736907f6e852cee95bc987418b4c86565 they're not planning to fix it. It's really disappointing.
@Aurimas-Cernius You should really consider that many games are still on Unity 2019.4 wanting to support their Android 4.4 players.
@Aurimas-Cernius What about this bug on Android 12? It made 3000 crashes on our game during last 30 days. Can you resolve it somehow?
And these two on Android 7.0 (2700 crashes total during last 30 days):
This is definitely bad news, and not really acceptable since the version was automatically upgraded when we jumped from 2020.3.30 to 32 and it seems we cannot force the old version.
Older version has it's own issues so no point to go back to be honest. @Aurimas-Cernius Can you please take a look at messages I've sent recently and let us know if issues can be fixed or not?
I'm getting this crash reported on iOS but I can't reproduce it locally. I'm not sure why it's happening only for some users. Has anyone else seen this?
Mobile Notifications v2.0.0
Unity 2020.3 does not support android 4.4.
The min version shouldn't have jumped to 32, only the target sdk.
Could it be iOS version specific?
Any clue if this is for push notification or local?
Maybe any info on what the actual exception is?
Here's more info.
No specific OS version.
Here's the full stack trace when I open the crash report in my project.
Seems it might not like me calling that method on app start? I'm calling the same function elsewhere in my app but this is the only place it crashes.
Figured it might be useful to share this post here.
I'm seeing a strange behavior with the DeliveryTime of my notification advancing 7 hours each time the applications loses and regains focus... very confused.
Unity 2020.3 does support android 4.4
Android: OS 4.4 or later; ARMv7 CPU with NEON support; OpenGL ES 2.0 or later.
Android 2021.1 does too, 2021.2 min support is android 5.1
I am also seeing strange behavior with notification delivery times being off by several hours (-10 hours in my case. I am +10 GMT). This is happening on iOS for me.
I recently updated from 1.4.2 to 2.0.0.
Hi - Is there any indication of when Custom Notification SFX will be supported?
I notice there's been a TODO in the iOS UnityNotificationManager.mm file since 2019
If Unity has no feedback on this, I will roll back to 1.4.2.
We are using Unity 2020.3.26, and about a month ago we have updated Mobile Notifications package from 1.4.2 to 2.0.0.
After that we have seen some ActivityThread crashes on Android 12 and 7, just like imaginalis described in This post and This post.
We decided to revert back to package version 1.4.2 and have rolled out a new app update yesterday, but now we are seeing new crashes on Android:
We were not able to reproduce this on our devices, but it has so far affected about 8% of our users on Android (not limited to specific Android versions).
It looks like local notifications that were shown (or scheduled?) from older app version (but newer package version 2.0.0) have somehow survived the app update procedure?
As far as I know, when the app is updated, all notifications for that app are removed (as observed on our own devices), or is this not the case?
Anyway, if I'm reading the crash log correctly, it seems that because of this, the newer app version (but older package version 1.4.2) has problems when deserializing data and the java code has no try-catch block to handle it.
In case it matters, we added Firebase Cloud Messaging in this latest app update, and have changed the Activity in the AndroidManifest.xml from
but we did not see any problems on our test devices and both systems have been running ok, so we really didn't expect to see so many crashes.
Please let me know if there is something we can do, or is our best bet to go back to updating the package version to 2.0.0 (where at least the crash rate was lower and limited to Android 7 and 12)?
We decided to stay on 2.0.0 because overall it causes less crashes than 1.4.2 for us. But still these issues on Android 7 and especially 12 need to be fixed urgently in my opinion as Android 12 player base is increasing. I'm also concerned about the issue our players experience on Android 4.4 and it seems really easy to fix as I mentioned earlier. Why not to fix that as well? Especially when 2019.4 LTS is still supported by Unity. I'm really expecting Unity to fix it @Aurimas-Cernius
We plan to release newer version of 1.4.x soon. 2.0.x too.
If we set an elapsed Time of about 15 seconds, we will be notified after 25+ seconds. If we set an elapsed Time of about 25 seconds, we will be notified after 45+ seconds. When we returned to ver1.4.2, the delay disappeared. Will the newer version fix the delay? @Aurimas-Cernius
Please report a bug with a simple repro project.
Submitted a bug report with a repro project. (Case 1421412)