Search code examples
androidrssfeed

RSS Feed Android app that expires?


I've seen many RSS feed android app examples. But the type of feed that I'm trying to return does not need to go into a list view. It provides an active code for a website that ends up expiring usually an hour, sometimes two hours later.

Here is an example of the feed.

code – 11/29/2012Thursday, November 29, 2012 5:23 PMCode: AlmostDecember Valid: Website Location: Home Expires: 3:30 PM PDT [1826103687] Worth: 6 Points

On the website, that number in the bracket shows up as a countdown and says expired when the time has come. Normally there is only at most 1 code. But occasionally there are 2 or maybe 3. I need the app to display only the active codes, not the ones that have expired. And i would still like to have that countdown timer there. Does anyone understand what i mean? Ive looked at most of the rss feed posts here, and none of them have been able to help me. Is this possible to do?


Solution

  • Use this coundDownTimer to expire the feed data in your view

     new CountDownTimer(30000, 1000) {
    
         public void onTick(long millisUntilFinished) {
             mTextField.setText("seconds remaining: " + millisUntilFinished / 1000);
         }
    
         public void onFinish() {
             mTextField.setText("done!");
         }
      }.start();