how to set refresh Interval In Application
<p>hi I am new in android. I have created one application and I use preferences for setting. I have used list preferences set  to 1,10 ,60 minute.  Now i want to apply a function so that another activity should be refreshed in each time interval. </p>

<pre><code>beerPref2
                .setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {

                    public boolean onPreferenceChange(Preference preference,
                            Object newValue) {
                        // TODO Auto-generated method stub

                        final ListPreference listrefresh = (ListPreference) preference;
                        final int idx = listrefresh
                                .findIndexOfValue((String) newValue);

                        if (idx == 0) {

                        } else if (idx == 1) {
                            // System.out.println("2");

                        } else if (idx == 2) {
                            System.out.println("3");
                        } else {
                            System.out.println("4");
                        }

                        return true;
                    }
</code></pre>

<p>This is code for preferences screen. Now i have another class named  DetailPage. This class we have to reload. Can You please complete this code. I have tried much but not able to do. I am new in android and want to implement this. Please help me and complete this code. How i will load another class in certain time interval? I mean to say that if we select 1 minute then the activity should reload each 1 minute. If we select 10 minutes then application should reload each 10 minute and ... Help me to implement this</p>
