Page 472


#1

Last paragraph, just before title “Delayed Execution with AlarmManager” says following:

See search part we discussed above? Good. Run PhotoGallery, and you should see your app getting new results initially. If you have a search query selected, you will probably see stale results when you subsequently start up the app.

The way I read this is like this “initially, I’ll keep getting new results most of the time but if I use a query, I’ll mostly see old results.” And this makes sense to me but…

The onHandleIntent() is called only once since service is started in PhotoGalleryFragment’s onCreate() (listing 29.3). Any subsequent searches will not print since onHandleIntent() is not fired on each search but only once Fragment’s onCreate(). onHandleINtent() will not be fired even if you change orientation.

So, I guess your statement above is trying to say that you will see the printouts from onHandleINtent() when you start - then close your activity. Then start it again, then close it again, start it, close it etc.