Search Issue Tracker
By Design
Votes
0
Found in [Package]
2.4.0
Issue ID
MNB-89
Regression
No
[Android] "AndroidNotificationCenter.GetLastNotificationIntent()" returns incorrect information when the app is not opened with a notification
How to reproduce:
1. Open the “Notification.zip“ project
2. Open the “SampleScene“
3. Install the app on the device
4. Clean out the logcat (“adb logcat -c“)
5. Start the logcat (“adb logcat > [filename].txt“)
6. Open the app
7. Put it in the background (Press the Home button)
8. Press on the notification badge that poped-up
9. Put the app into the background (Press the Home button)
10. Open the app by picking it from Overview
Expected result: The last log in the logcat is “MYDEBUG“
Actual result: The last log in the logcat is “MYDEBUG Unity.Notifications.Android.AndroidNotificationIntentData”
Reproducible with: 2.3.2 (2023.3.0b10), 2.4.0 (2022.3.61f1, 6000.0.45f1, 6000.1.0b14, 6000.2.0a8)
Reproducible environment: macOS 15.3.1 (M4 Max), Windows 11 (Reporters)
Not reproducible environment: No other environment tested
Reproducible with these devices:
VLNQA00518, Google Pixel 4 (Pixel 4), Android 13, CPU: Snapdragon 855 SM8150, GPU: Adreno (TM) 640
VLNQA00335, Samsung Galaxy S20+ 5G (SM-G986B), Android 10, CPU: Exynos 990, GPU: Mali-G77
VLNQA00511, Samsung Galaxy S8 (SM-G950F), Android 9, CPU: Exynos 9 Octa 8895, GPU: Mali-G71
VLNQA00107, Huawei Nexus 6P (Nexus 6P), Android 8.1.0, CPU: Snapdragon 810 MSM8994, GPU: Adreno (TM) 430
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- "NullReferenceException" error is thrown when swapping between built-in and URP depending on assets loaded out of asset bundles
- Objects receive a black outline in Ray Traced Screen Space Reflections
- NullReferenceException Occurs When Baking APV with GPU Streaming Enabled
- Scene renders incorrectly when using RenderGraphUtils.AddCopyPass
- [URP] Searchable context menu instantly closes when attempting to open it
Resolution Note:
As per documentation: "Allows retrieving the notification used to open the app."
If app is opened not via notification, the Intent for opening is different and does not contain notification in it.
https://docs.unity3d.com/Packages/com.unity.mobile.notifications@2.4/api/Unity.Notifications.Android.AndroidNotificationCenter.html#Unity_Notifications_Android_AndroidNotificationCenter_GetLastNotificationIntent