Agasper / unity-android-notifications

Unity3D Plugin for Android local notifications with example project
Other
555 stars 184 forks source link

Fix PendingIntent is not passsed to onReceive method #107

Closed napbla closed 6 years ago

napbla commented 6 years ago

When I passed a PendingIntent to AlarmManager and later receive it via via onReceive method, it returns null. As it is stated in this thread I think we have to change a little bit : https://stackoverflow.com/questions/18649728/android-cannot-pass-intent-extras-though-alarmmanager/41429570#41429570

Moreover, there is still an issue which is reported and unsolved. As it is also stated on the above link, we have to marshal Parcelable object into bytes array to pass to onReceive method later. That's why it's always null when calling bundle.getBundleExtra and crash the notification.

Now I have not fixed the Parcelable yet, only make a null check to make it run because my app does not need "action" now, but if I have time I will fix this if you do not have time maintain this project.

Agasper commented 6 years ago

Thanks for your time, unfortunately i don't have enough time at the moment to fix issues.