In my application I have a activity that displays contents from internet..... I just want to know how can I auto refresh the activity.....
Please suggest and provide
Consider purchasing "The Busy Coder's Guide to Advanced Android Development", to read in particular Chapter 13, "Advanced Service Patterns". The source code for this chapter is available on Github, with this handy introduction:
CWAC Wakeful: Staying Awake At Work
The recommended pattern for Android's equivalent to cron jobs and Windows scheduled tasks is to use AlarmManager. This works well when coupled with an IntentService, as the service will do its work on a background thread and shut down when there is no more work to do.
It goes over coupling AlarmManager with an IntentSerivce. This is far more complex than using a Handler, but packaging data services in a Service is a good practice and actually compulsory if you want to share data between different applications.
If you don't know how to use services, consider purchasing The Busy Coder's Guide to Android Development. It "comes with" the book I mentioned earlier. I bought all of them yesterday and they're a veritable goldmine.