flutter_local_notification code no longer working - flutter

My push notification code was working as of yesterday but now I'm getting error for SelectNotificationCallback.
I've added a screenshot of the code below.

Did you update the package?
Check the changelog for the latest versions:
https://pub.dev/packages/flutter_local_notifications/changelog
10.0.0:
onDidReceiveNotificationResponse: invoked only when the app is running. This works for when a user has selected a notification or notification action. This replaces the onSelectNotification callback that existed before.

Related

Why isn't my firebase listener firing when the app is offline and initialized offline

I've setup a listener on my database that is only failing to respond in a weird offline scenario.
On setup I'm adding a listener to a database that should fire anytime there's an update...
let mySpots = self.databaseRefSpots.child("users").child(globalMasterUser.userUID).child("type").observe(.value, with: { snapshot in
//code that should be executed when there's an update.
Once the user takes some action that should get saved, it's saved to the firebase database using...
annotationdb.child("type").setValue("Feature")
annotationdb.child("properties").setValue(propDict)
annotationdb.child("geometry").setValue(["type":"Point"])
annotationdb.child("geometry").child("coordinates").setValue(coordinates)
This code works whenever the user is online, and when a user starts the app online and goes offline.
But, if the listener is created when the app is initialized in an offline state, it looks like the listener is setup successfully, but after my setValue's are called, the listener isn't called. If I turn the data connection on, at that point my listeners are called with the values I set with setValue.
Any idea why the listeners aren't firing in this offline state?
I've tried stepping through the firebase code to see if the listener is getting hit and it's not. I've tried creating separate listeners to catch this scenario and they wont fire either.

Where does the Win10 Toast Notification snoozed data reside?

I just created a powershell script to show a toast notification with a Snooze button and time options. This is what I have problems with:
Toast Notification with Snooze option
Every time I execute the script I want to check if there is a previous snoozed notification and, if there is, the scrip will exit not showing a new notification.
Does anyone knows where does the snoozed notifications data resides?
I tried looking on the registry and Task Scheduler but no luck, I'm sure there has to be some place where it holds the notification until the snooze time finishes to show it again in the Action Center.
found the answer and I'll post it here in case someone else is looking for it:
$app = '{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\WindowsPowerShell\v1.0\powershell.exe'
$toasts = [Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier($app)
$notifications = $toasts.GetScheduledToastNotifications()
This will get all your scheduled toast notifications and then you can play with that info :)

Event should trigger when Toastr notification appears

i want to trigger an event using protractor for close the Toastr notification messages. whenever the notification appears this event should triggered.. is this possible??
I have 10 forms ,i am validating these forms using protractor. In each form i have editable text fields. If you add/edit/delete any fields you will get toastr notification message. I want to close these messge whenever it appears in my appliaction.
is this possible?? Thanks in advance..
You can execute JS code while running your test for closing toastr notification, you could try this one (I tested it in their demo project - run this code toastr.remove() in a console when toastr notification was shown):
await browser.executeScript(toastr.remove())
note that browser.executeScript() return Promise so you need to resolve it.

Get Started button appears but posback not coming to server

Based on this documentation Get Started Button - Messenger Platform I have created a get started button. I got this result from CURL
{
"result": "Successfully added new_thread's CTAs"
}
The button appears properly, but when clicking on the button the postback is not triggering in my webhook.
I have all the following fields in app settings
message_deliveries, message_echoes, message_reads, messages,
messaging_account_linking, messaging_checkout_updates,
messaging_optins, messaging_payments, messaging_postbacks,
messaging_referrals
Other bot text processing works properly.
Anyone faced this issue?
----[EDIT]----
It seems there are multiple page access token assigned to the hook, for each page access token we need to set the menu.
I have deleted and re-created the app then it started working

Plone 4: send email when user info is updated

I am attempting to add an event listener to a custom product so that I can send an email when the ##personal-information page is saved.
I tried putting the following in my configure.zcml:
<subscriber
for="Products.PluggableAuthService.interfaces.events.IPropertiesUpdatedEvent"
handler=".handlers.userupdate"
/>
And then in my handlers.py:
def userupdate(event):
""" Handler for User Properties Updated """
... code to send email...
I'm not receiving any errors, but nothing happens. Is that not the right event to listen for? Is there a better way to accomplish this?
This is the right approach and your code looks fine to me. Try to set a pdb-statement into your userupdate method and start your instance in the foreground ("bin/instance fg") to see if the code is called when you edit the personal information of a user:
def userupdate(event):
import pdb; pdb.set_trace()
If the method is not called at all, then this might be a bug. Probably this one:
https://bugs.launchpad.net/zope-pas/+bug/795086
Try to use a more recent version of Products.PluggableAuthService in which this bug has been fixed.
http://pypi.python.org/pypi/Products.PluggableAuthService
According to the release notes using Products.PluggableAuthService 1.7.6 should do the trick.