Google Calendar API: Possible to get reminders due in a certain period? - calendar

I wonder if its possible to get reminders due in a certain period of time. I am working on a Calendar app. I was thinking of using Google Calendar as a "backend/calendar storage engine". Since implementing a calendar backend seems hard. The recurrences and reminders part. The challenge that I have now is, I want to send push notifications for reminders. So was wondering if there is a way to query for reminders due the next hour for example.
How can I do this?

Reminders are alarms triggered at a specified time before an event starts
However, the delivery mechanisms only available by Google API are
Pop-up. These are supported on mobile platforms and on web clients.
Email sent by the server.
SMS. These are only available for Google Apps for Work, Education, and Government customers.
Push Notification is a bit different, as you're required to have a GCM Connection Server with additional configurations in the developer console.

Related

google calendar javascript api: how to create a calendar in my google account and not in oauth authenticated user?

I'm thinking on my scenario and there is a point I cannot manage to bring to a valid approach:
I have a web app where users log in and, among other things, they can create calendars. If this calendars are marked as publics, all users can see them.
I want them to be able to sync the calendars with their google calendar account. I have this already implemented using gapi.
The problem is when, after a while, any user updates an event of a calendar which other user had synchronized before. He is not going to see the changes in his google calendar, as I'm not able to send him updates since he is not logged into the app.
So, my idea was to create all calendars in our own account, and whoever wants to have it in their google account, just have to subscribe to it. I would do that with gapi.acl lib.
What I don't know how to do is: when the first user wants to syncronize the calendar, it should first be created in our own google account, so that the user will be able to subscribe to it...
But how do I change the account where to create a calendar using gapi?
Maybe it is a stupid question but I cannot manage to find out how to do it.
Thanks in advance!!!!
But how do I change the account where to create a calendar using gapi?
You cant, what you are trying to do is get offline access to a users Google calendar data. OffLine access means that your application can access the users account when the user is "offLine" as in not there. This being a fully automated functionality of your application.
You need to request permission of the user for "offline" access once that is granted you are given a Refresh token the refresh token can then be used to request a new access token when ever your application needs even if the user is "offline".
Your problem being that JavaScript is client side this means that the code is running in the users browser. Due to major security concerns offline access is not something you can request using JavaScript you need to use a server sided programming language.
Maybe it is a stupid question but I cannot manage to find out how to do it.
I don't think its a stupid question but I do think there are some major wholes in your applicating design.
You first need to think of if users really want you writing to their personal calendar account.
Then you need to consider weather or not you want to be writing and sharing your personal calendar with a bunch of unknown users.
There are also major limitations to the number of writes or inserts you can make to a single calendar per day so storing everyone's calendar data in your own calendar is going to not only messy but it may end up overloading your request limit.
Once all that is added up have you considered the verification process this application is going to have to go though. How will you justify your application to googles security review, I am writing to a users calendar, I am storing users calendar data in my own personal calendar ....

How do I send live updates to my Android device?

I want to send live updates to a phone to my app, approximately 1KB/sec. It is acceptable, if for reasons of power management, the updates will come about once per minute in batches, since Google advises that what drains the battery is leaving the radio on, and that a radio drops power after 15sec. What is the appropriate tool to use?
Websockets/stomp. That's what I am already using for the browser client. However my worry is that it will keep the radio on, and devastate the battery.
Google Cloud Messaging. Google promises that it's battery efficient, however how live is it? Who controls the frequency of pushes? Is it designed for a lot of data? Does it have to put notifications up for every push which would be highly undesirable to me since it's a push every second.
Amazon SNS. I already use Amazon AWS, so it may fit the profile well. How good is it with power management?
Something else that I don't know of
There is now https://firebase.google.com/docs/cloud-messaging/
Firebase Cloud Messaging (FCM) is a cross-platform messaging solution
that lets you reliably deliver messages and notifications at no cost.
and
For use cases such as instant messaging, a message can transfer a
payload of up to 4KB to a client app.
FCM is the new version of GCM under the Firebase brand. (read more about FCM v GCM and limits and pricing)
As you write
the updates will come about once per minute in batches
the server could send a notification if a new batch is ready, instead of every second.
Instead of transferring the payload with the notification, the app could use a HTTP(S) connection to get the payload. This would allow to download all updates in one batch with one HTTP request, which might be more efficient (less overhead).

Does bluemix have an API to fetch application monitoring/metrics results?

I see that bluemix has a service called Monitoring and Analytics. All I see from that service are dashboards. I am looking for the information the dashboards are providing in the form of an API. For example, if I want to be notified that my application is down or it is slow running, etc .. Is there a way for me to either receive such alerts or for an API that I can poll periodically?
thank you
The Monitoring & Analytics service does not offer an API to retrieve its collected metrics. We realize that supporting a programmatic interface would be helpful and it's in our backlog to add that capability.
However, M&A does support the other part of your question regarding alerts. There should be an Events tab in your dashboard. In the upper right corner, there's a dropdown to "Configure events policy". If you select it, you can enable Availability alerts ("Is my app down?") and/or Performance Monitoring alerts which are geared to the app's run-time type (Liberty, Node.js, etc.). In that same dropdown you can also "Configure notification". If you specify your email address in the notification dialog, you will start receiving alerts when your Bluemix application is down or running slowly.

GAE - mail API - dialy limits

According to https://developers.google.com/appengine/docs/quotas#Mail
a GAE app developed by a third party (anyone of us) and hosted in GA Cloud has a limit of 20.000 messages that can send each day, right ?
What if an app has registered 100.000 end-users that accepted to receive a daily email notification ?
isnt GAE a platform for this kind of apps ? do we have to find out for another provider ?
does the app must use a third-party service like mailchimp api or similar to do this job ?
thanks,
d.-
GAE no longer supports sending more than 100 emails and they will not increase your quota using this form request. They are nudging people to SendGrid (why SendGrid specifically in unclear). Its an unfortunate reduction in GAE capabilities.
They have a nice little footnote in there that says:
The new limit of 20,000 messages per day only applies to applications
created on or after December 14th, 2012. Applications created before
this date will not be subject to this limit, even if they enable
billing after December 14th.
You may be able to go around this by converting an old and unused GAE project to send the emails. If you don't have one, you can ask your friends if they do. Pretty much everybody I know has at least one or two dead GAE projects.
You can request a quota-increase here: http://support.google.com/code/bin/request.py?&contact_type=AppEngineCPURequest
Explain what you are doing and why you need more of your mail-quota.

Google Application Engine For Sending Emails

I have a newsletter with 13k subscribers. I would like to use Google to send the newsletter instead of the free edition of mailenable I am using currently.
The main thing that has put me off is the 2,000/day sending limit as it would take a week to send out a bi weekly newsletter which may have time sensitive information in it.
I saw a post here that said you can send over the 2,000/day limit if you use the GAE.
I went to the GAE page and had a look at the limits and it does say that you can make 1,700,000 email queries. However, I called the Google apps sales team and they said Google says anything above 2,000 emails is spam and has no legitimate purpose (I had the feeling though that the person I was talking to was poorly trained and had no idea what the GAE was).
So would I need to create my own google app that acts like a SMTP server and uses the GAE to send the email? Would this be the same as sending through Google Apps, i.e. DKIM header added and trusted IP?
Any help anyone can give me is greatly appreciated.
Many thanks in advance.
From my experience GAE is a very bad platform to send bulk emails.
For a long time it didn't support DKIM or Sender Id, its hard to mange bounces, and on top of everything you need to write your own framework for bulk sending using tasks or backends.
The cost of instances time for sending those emails might even double your cost (in $$$) for sending the newsletter.
We choose to go with Mailchimp which is IMHO the best tool for sending bulk newsletters.
Billed applications can indeed send more than the default daily free limit of emails with App Engine. Once you have enabled billing, you can choose how much quota you want to dedicate to your app, including email sending.

Resources