Google Admin SDK user push notifications and renaming of users - google-admin-sdk

I want to ask about the situation that is related to the renaming of a user by an administrator. It can take up to 10 minutes (from the disclaimer) to get user's name changed, but the notification about update event is sent immediately. There is no way to understand whether user's data is changed or not at the moment when notification is received. The only way to process it correctly is to delay processing by 10 minutes which is not good for me.
Is there something that I've missed to handle this? Otherwise it is quite useless API.

Related

How can I know whether user clicked on notification or not?

my tried wayI am trying to know when i am sending push notification to users they will open the notification or not. i am able to get the number of sent notification or number of successful and failed notification but i am unable to get the user response record.I am using aws sns push notification with fcm
it's easy!
Just put a little code in notification code, when user clicked the notification it gets the value from the database which is 0 when you start sending the notification, and add +1 in it and again store that value in the database.
This is the simple way you can check how many people open your notification.
Regards,
Sameer Rehman

How to send a "you haven't used your app in a while " push notification in React Native using AWS?

Just wanted to know from a high level how I would accomplish this.
I thought that when a user opens the application, I will keep track of the last opened time in a Dynamo DB table.
Then I could have a background worker constantly check and see if anybody hasn't used their app in 3 or 4 days and then send a push notification, ie, "you haven't used your app in a while, why don't you open it up and do XYZ."
From a very high level, there are two possible ways:
1.) Local notifications (you don't need AWS for this):
You can schedule a local notification, every time the user opens up the app (or better - every time the user brings the app to foreground). It works like: User opens app -> cancel old scheduled notification if existing -> schedule new notification for "in 3 or 4 days" -> ready :-)
You can use something like this: https://github.com/zo0r/react-native-push-notification (see section Sheduled Notifications).
2.) You could do it with remote notifications (https://aws.amazon.com/sns/):
You can go the way you proposed. Then you have to store an entry in your db with the push notification token of the device and the last time the app was opened. Your worker then has to check and send the push message to the device using a service like SNS.
I would recommend 1.) over 2.) because you are independent from the users internet connection when getting the app opening info. In 2.) you can miss the opening info, when the user opens the app without internet connection. Also 2.) is more expensive then 1.) when you scale your app.
An advantage of 2.) would be, that you are more flexible when and what you send in your notification, since you can edit it on server side. 1.) would mean that it is coded in your app (at least until you build a synchronization mechanism for the variables) :-)

Building Alexa Skill that pushes an alarm

I'm trying to build an alexa skill that fires a custom alarm every set number of times per day (30 min intervals for example). I'm reading through their docs and not fulling understanding where to go to next.
Does anyone have some good Alexa skill apps that I can reference or an article? I couldn't find much online and it looks like it hasn't been an accessible feature for too long.
You cannot trigger Alexa to speak without user interaction. That means, the user has to say something to trigger your skill, which will in turn create a request to you skill's backend, and you can only respond (be it audio or speech) back to that request.
However, you can send Push Notifications.
Notification indicators inform end users that new content is available
from Alexa skills and domains. When a notification is delivered,
depending on what the product is capable of, the user is notified by
visual and audio indicators.
More on Push Notification here

Django: Send reminder email

my app has list of events with start time (date and time). I want to make a scheduled task to send reminder via email to all user participate in event 1 hour before event start. (Note: Admin can change time of event).
I currently use celery to send email to list of participants when admin change the time of event.
Please suggest me some solution for this. Thanks.
Here's a recent(ish) discussion where a potential solution is proposed for celery: https://github.com/celery/celery/issues/4522.
I built Posthook to make solving these kinds of problems easier for developers. In your case, when a new event is created or the event time changes you can schedule a request back to your app for 1 hour before the start time. Then when you get the request from Posthook you can send out the reminder after validating that it still needs to be sent out.

Delayed SES Stats Updation

I am noticing AWS SES stats are not being updated in real-time. After sending email, it takes time for sent count to increase on SES Dashboard. Sometimes it takes few minutes and sometimes it takes long.
Has anyone also experienced this? Any thoughts?
On the assumption that the console is simply making a call to a standard API action (rather than using some kind a console-only backend service that is not documented or user-accessible -- such things are not unheard-of, but are pretty rare in AWS, so it's a reasonably safe assumption), it looks like this is not really designed to be real-time. The stats are reported in 15 minute windows.
From the SES API reference:
GetSendStatistics
Returns the user's sending statistics. The result is a list of data points, representing the last two weeks of sending activity.
Each data point in the list contains statistics for a 15-minute interval.
— http://docs.aws.amazon.com/ses/latest/APIReference/API_GetSendStatistics.html
AWS/SES dashboard stats are for pure hint performace but not to rely on them. In such case, if you want to have real time notifications of sent emails you will need to create SNS notifications. Keep in mind that Spam-Complaint notifications can take up to a couple of days as this is based on information provided by the ISP to Amazon. And complaints within the Gmail evil-system will NEVER get to you.