Sending mail regularly
I have an application that collects the report on usage and stores it into the core data model. The application has to send mail every hour to the client despite of the application running or not. I have created a java开发者_如何学编程 servlet that runs on google app engine to send email every hour. But, the mail is sent with all the information collected from the iphone.
So, how is it possible to collect data and send mail frequently ? Or how should be the server model(cron job or database) such that it gives smoother user experience.
I did something like this a while ago, you have to be cunning about it.
You can schedule methods for the iPhone to run, and its meant for VOIP, but you can just claim your app is a voip app and run this in the BG. How to Maintain VOIP socket connection in background?
In that method you can send an email out. You won't be able to do it with user input, obviously, but there is a google project out there for easy sending email. http://code.google.com/p/remail-iphone/
精彩评论