English 中文(简体)
How do I send a push notification to a device at regular intervals?
原标题:

How do I send a push notification to a device at regular intervals, e.g. every x minutes?

最佳回答

There is no "built in" way to do this just using APNS. You would have to have your push provider code do this for you.

In my case my push provider pulls rows from a DB table and sends them at the time specified. I would just insert another row back into the DB after I sent a message.

As for limit, everyone I have talked to says that there is in effect no limit.

chris.

问题回答

[Tapping this out on my phone - hopefully the formatting is all right - I ll fix it later if necessary. Apologies in advance if it s messy...]

As others have pointed out, you ll want to look at Apple s docs for how to do this (it s not the most straightforward process in the world)..

What I wanted to contribute is the suggestion that you check this out: http://urbanairship.com/push/

Urban Airship takes care of a ton of the hassle you d otherwise have to deal with yourself. You still need to be registered with Apple for sending push-notifications, but if you use Urban Airship s bits, they ll provide you hosting for your notification service, reporting, a management console, and a REST API for interacting with the system. They even have a scheduling component, and I d bet that it would solve your problem here with just a few simple calls.

These guys are local to me (I live in Portland, Oregon), and I ve seen a few of their demos - it s slick.

There are other features, but I think the ones listed are compelling enough to at least give it a look :)

It s obviously not required - you could do all this on your own, but the service they re offering is insanely good and affordable.

At the time of this writing, they have an "indie" account that will let you send 100,000 notifications through them a month for free. After that it s $.001 per notification (again, this appears to be per month - so, if I understand the terms right, you get 100,000 notifications for free each month, which is just awesome).

You can see the different pricing options here: http://urbanairship.com/plans-and-pricing/

I m not affiliated with these guys in any way beyond having chatted with them at local geek events and having been offered, along with other attendees, free alcoholic beverages. But, as I don t drink, I d like to think my judgment hasn t been affected by the psychology of gifting (fascinating subject).

So... it s worth it to at least take a look at what they re offering. And if anybody else has links to similar services, post em in the comments. Apple has given devs an amazing platform to play with, but they haven t made it very easy in places - it s cool to see shops like this making it more accessible.

In my opinion, of course :)





相关问题
How do I wait for a TTimer to finish?

I have a TFrame (fraDisplay) with a TTimer (timAnimateDataChange). The timer is used to control a small animation. In the form containing the frame I want to have a method that does something like ...

How to tell if an ajax timer has gone off at page_load

I have a web application and I m attempting to put an ajax timer control in it to give me a post back every 10-20 seconds. (possibly longer depending on performance). I have a lot of dynamically ...

Got an error 1120 ~ Access of undefined property

This is not your typical 1120. I know better than to have buttons/MCs without instance names on the timeline. Nope, this problem resides in a I timer I built from script I found online. The undefined ...

what is the right way to call the Timer ElapsedEventHandler

i have a timer that calls its even handler method every 30 seconds. but i want to initialy call this method. the signature of the event handler method is void TimerElapsed_GenerateRunTimes(object ...

Timer for a polling windows service

I wrote a Timer class in order to use it within a windows service that is polling another system. I did this because I had two issues that the System.Timers.Timer is not addressing. The Elapsed ...

Using C# Timer to stop executing a Program

I want a program to stop executing for a certain amount of time. And i want this to happen in regular intervals. For example, i want a program to run for 5 minutes and then it should stop for 2 ...

热门标签