I've written a Muzei plugin that uses the Flickr API to check for and fetch a remote image once an hour. I've noticed that sometimes my app will get in to a bad state however and will stop updating. I've checked the shared prefs (where Muzei stores the next update time) and I've noticed that the scheduled_update_time_millis
variable is no longer present in my art source xml file.
I've double checked my RemoteMuzeiArtSource.onTryUpdate()
method call and I've verified that it should always either call
long CHECK_INTERVAL_MILLIS = 1 * 60 * 60 * 1000L; // 1 hr
scheduleUpdate(System.currentTimeMillis() + CHECK_INTERVAL_MILLIS);
or throw a RetryException
I'm unable to consistently repro getting into this bad state unfortunately, so I'm not sure how it happens.
Full source for my RemoteMuzeiArtSource class lives here: CactusArtSource