Google calendar API push notifications - update from API creates unnecessary notification - ruby-on-rails

I have a rails app using Google calendar API with push notifications for each calendar the user shares with my app.
when user updates an event from app, it creates an updatedEvent request to API.
because the calendar is listed to push notification, it pushes a notification about some update to the calendar events (the same event of course ).
am i missing an attribute that can silent the notify?
when i get notify about changes and get the changed items from response, i compare the etag of the event with the one that i get from the API response so i manged to avoid another update.
but it's still an unnecessary update.

Related

How to push notifications based on changes?

I am trying to make an app which listens to changes of the Internet API even if the app is closed, and sends push notification to the user who set up some value matching conditions with the value from the API. I am new to push motifications and I am not sure if is that possible with natvie notifications system or I have to use some 3rd parties like Firebase Messaging.

Send currency in push notifications via Firebase Cloud messaging

We are able to send currency via the Custom data parameters in Firebase Cloud messaging (see SS below).
But if the user does not tap the notification "YOU RECEIVED 15 FREE GOLD!" then Firebase.Messaging.FirebaseMessaging.MessageReceived is never fired and the user never gets their currency. So the user may see the notification, and then be disappointed the next time they open the app and there is no gold.
Is there a way in Firebase to compose the notification so that the notification can be accessed even if the user did not tap the notification to open the app?
Without tapping on notification your application not launch and custom data you sent through notification is not received to the application. So sending custom data through firebase push notification is wrong choice in this scenario. You should sent custom data whatever you need through API is always good choice. You can also use firebase database and in that you can send custom data using nodes for respective user.

MSGraph Calendar Events Multiple Notifications

Noticed that I am receiving multiple notifications when a calendar event is created or updated. For example, I created an event on Outlook calendar web client and invited some attendees. I received one notification with changeType as "created", followed by 4 notifications with changeType as "updated". What is the logic behind the notifications? There were no updates made to this event. All the notifications came within 1 or 2 seconds after the first "created" notification.
The number of notifications depends on the number of objects your event action affects. For example creating a new meeting results in an update of the calendar folder object. Remember that you are not subscribed only to the event but the calendar, so your requirement from the API maybe a subset of what the API does
IMHO it is a redundant feature carried forward from EWS

Is there a way to get outlook push notification, only when a specific field of calendar item is updated?

I followed the Outlook push notification documentation to subscribe for calendar notifications. And I am able to receive push notification whenever calendar item is changed or deleted. Now I want to receive push notification only when specific properties(example: To, Start time and End time properties) of calendar item are updated or calendar item itself is deleted.
Is there any API available to implement above scenario?
This isn't supported, the hooks are scoped at the object level (event, user, etc). You cannot subscribe to an individual property.

iOS Local Notifications with an API call

I am trying to create a local notification with the following requirements:
The user sets the days of the week for the notification
The user selects the time of day for the notification
The message of the notification requires calling an API to get the content.
For example, the user wants to know what the traffic is like on their commute every weekday at 0800.
There are some great tutorials on creating Local Notifications (like this one Adding Local Notifications in Your iOS App - appcoda), but I would like to know if I can make an API call to populate the message of the notification.
So rather than having an annoying "Check out the traffic now" notification which can quickly direct the user to the relevant page in my app, I would like to have: "There is minor congestion on the {road}" or "The roads look clear right now"
Is this at all possible? Thanks.
EDIT: Post iOS7 release
So it seems we have;
Background Fetch - able to fetch the new content and keep the content up-to-date
Remote Notifications - able to download the content when the app receives the push notification
Neither of these work in my scenario. I need to make a call as close to the user's specified time as possible. With background fetch, it is no use if the last update was at 5am when the roads were probably clear. Remote notifications are not ideal either as I am not pushing a notification, I would be displaying a local notification.
Does anyone know of a clever workaround to achieve this solution?

Resources