after updating to version B4A 8.0 and then 8.3, notifications that used the Notification class no longer work.
I documented on the site, and I saw that I had to move the setInfo function to the end. In fact, with version 8.0 has started to work again, with version 8.30 it does not work anymore.
Here is the code:
First of all, I do not understand why the Error Notification class:
(RuntimeException) java.lang.RuntimeException: Can not change properties after call to SetInfo. Initialize the notification again.
Even if I set the SetInfo at the end ?!
Then I read these threads:
https://www.b4x.com/android/forum/threads/android-jar-targetsdkversion-minsdkversion.87610/#content
https://www.b4x.com/android/forum/threads/version-safe-notification.87663/
I saw example notifications with the class NB6 - Notifications Builder class (2018) that works well.
Before changing all the notifications of my application, I ask you for help to understand well, if I have to replace all Notification objects with the new class? Because?
Thanks in advance
I documented on the site, and I saw that I had to move the setInfo function to the end. In fact, with version 8.0 has started to work again, with version 8.30 it does not work anymore.
Here is the code:
B4X:
mNotification.Icon = "sync_gray_icon"
mNotification.Sound = False
mNotification.Vibrate = False
'06/11/2018 - with the new version the SetInfo must be called at the end of everything
'mNotification.SetInfo ("Sync notification", "Synchronization in progress .....", Null)
mNotification.Notify (mIDNotifyConnection)
First of all, I do not understand why the Error Notification class:
(RuntimeException) java.lang.RuntimeException: Can not change properties after call to SetInfo. Initialize the notification again.
Even if I set the SetInfo at the end ?!
Then I read these threads:
https://www.b4x.com/android/forum/threads/android-jar-targetsdkversion-minsdkversion.87610/#content
https://www.b4x.com/android/forum/threads/version-safe-notification.87663/
I saw example notifications with the class NB6 - Notifications Builder class (2018) that works well.
Before changing all the notifications of my application, I ask you for help to understand well, if I have to replace all Notification objects with the new class? Because?
Thanks in advance