I created RSS widget that fetches data on onUpdate and saves it in an ArrayList of article objects. Each Object class look like so:
public class Story {
private String title;
private String link;
private Date pubDate;
private String imgUrl;
private Bitmap img;
private String content;
}
It holds the data and as well the image in Bitmap format (very small images). The widget works like so, on pressing right and left buttons on widget it cycles between stories from an ArrayList. I can see that the data holds about 12-24 hours in the ArrayList, and then the widget is not working anymore.
- What is the best way to store data for widget like this?
- What is a life expectancy for global variables in widget?