Flutter: delete calendar events in Gmail - flutter

I'm creating some local notifications for my users to remain them different events. I achieved this by using https://pub.dev/packages/flutter_local_notifications. These notifications are scheduled and can be removed easily.
I was thinking in other hand to move this to the private calendar wit Gmail. I have done this in the past and I know how to create them but I was wondering if I could remove also them.
In my app I have different portfolios. These contain rents and each rent has leases. When the user creates a lease an event is created with the different payment days.
If the user deletes either the event, the lease, the rent or the portfolio, I need to remove automatically all the notifications. Right now, since this is created with local_notifications I can do it, but would it be possible by having the events created in Gmail?
Could I created/remove a bunch of events without displaying the Gmail calendar app?

Related

"Unsubscribe" From CKQuerySubscription Without Removing It (Multiple Users)

I have a Role Type that multiple users are subscribed to recordCreation changes for.
It's easy to add new users to this CKQuerySubscription by using its subscriptionID, however the issue arises when I try to 'unsubscribe' one of the users from the subscription using the CKContainer.default().publicCloudDatabase.delete(withSubscriptionID:) method.
Rather than just stopping this device from receiving any further notifications, it deletes the subscription (for all other users as well).
So my question is: how do I remove one user from a CKQuerySubscription without deleting the subscription for other users who are also subscribed to it?

What Kind of Service Do I Need to Use for Sending User-to-User Push Notifications on iOS

I need a little help with understanding what to look for when selecting a service to use for allowing my application's users to create accounts and send push notifications to each other. I do not have any backend service experience, except for with Parse, and I don't understand some of the functionality requirements.
I want users to be able to register an account and add other users. Then, I would like the users to be able to select specific users from their "friends" list in order to send a push notification to each selected user for a meeting. However, I honestly don't even know where to start.
It seems that many of the services that I have looked at are set up for sending targeted push notifications to groups of users from a dashboard (seemingly for marketing and other purposes).
I am completely new to servers and backends, except for a little activity with Parse, so can anyone recommend a direction for me to take for integrating such functionality in an iOS application that I am working on?
You can use mbaas providers like built.io backend, It provides push notification functionality on object creation event, and a set of ACL can be specified on these objects. This will act as a filter criteria as to who are the allowed to receive this push notification.
You can refer to their docs here https://docs.built.io

Send push notification to specific user?

I'm making an app where I want to be able to set a basic notification (title, message, fire date) and have been trying to figure out the best way to setup the notifications. I'm working with Swift 3 and Firebase 3.
I don't want to use local notifications because if the user is logged in on multiple devices I want it to push to all those devices.
Is there a way to do this with FCM where a user can set a notification to fire at a specific date and time and have it fire on all (iOS) devices logged in?
If FCM doesn't have this, is there another APK that does? I've looked at Batch briefly but I'm already using Firebase.
Thanks in advance!
If your main use case is to send a push notification to a single user for his multiple devices, I suggest you make use of Device Group Messaging on iOS. As per the docs, it is typically used for:
With device group messaging, app servers can send a single message to multiple instances of an app running on devices belonging to a group. Typically, "group" refers a set of different devices that belong to a single user.
When it comes to sending the notification on a specific date, I'm pretty sure you can set it up in the Firebase Console.
However, if you intend it to be sent from the server, you have to implement it yourself, since I think, there is no currently API available or a parameter you can set in the payload that can be modified for the message to be sent for a specific date.

Send reminder notifications for user's birthday

I am creating an app using Swift and Parse as my backend platform. In my application a User can send an invitation to be connected to another user and as soon as they are connected the app should send notifications to remind the user about his friend’s birthday.
In this scenario I have two moments in which the app should send a notification:
1- When user A sends an invitation to user B, user B should receive a notification
2- When it’s user’s B birthday, user A should receive a notification and vice versa
I created a Parse object called AppNotification that is responsible for storing information about the notifications the user should receive. So when a user sends an invitation to another user I am adding a line in the AppNotification table, the same happens when it’s a birthday of a friend. Using this I can calculate the number of unread notifications and show it to the user in the UI using the components badge.
My question is more related to the best way to send the birthday notification. What I am considering is:
1- When user A sends and invitation to user B I have to send a push notification to user B.
2- As soon as the users are connected I can schedule local notifications to remind them about the birthday. This solution would use Local Notifications instead of Push Notifications.
3- Or create a Job in Parse that will be executed every day and will read all the users whose birthday is today and send a push notification to his friends. This solution would use Push notifications and I would not need to worry about scheduling local notifications.
Between the points 2 and 3 which one is the best solution? Is there any other approach I could use? When should I consider using Local Notifications other than Remote Notifications?
Thank you in advance.
Regarding points 2 and 3: there are pros and cons for both options: Having the reminders as local notifications is basically what your local calendar app does, i.e. you don't need a connection the Internet / Parse. However: what happens if one party (A) decides that she no longer wants to be a "friend" (of B)? Should notifications still be sent? If not, you could easily delete the scheduled notification on the server. This would also ensure that the other party (B) wouldn't receive notifications of a former friend (A) if she didn't open the app in the meantime and synced the list of friends.
There are of course more pros and cons, so it is really a matter of your preference and possibly other constraints (e.g. should an active internet connection be necessity?).

Trigger when a certain appointment is changed

Is there a way to trigger execution of code when a certain appointment is changed in Exchange?
I push into Exchange via EWS some appointments created from information stored in our application, and when any of these appointments is deleted or rescheduled, I want to execute my own actions (like, send out complaint emails or update the information in our application).
Can I somehow hook a trigger to these appointments?
You can't scope it to specific appointments, but you can get notifications on the calendar. https://msdn.microsoft.com/EN-US/library/office/dn458791(v=exchg.150).aspx