Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

5.
Use a static factory method whenever possible
5
Effective Java (2nd ed.): Item 1!
“A second advantage of static factory methods is that,
unlike constructors, they are not required to create a
new object each time they’re invoked.”

31.
Service considerations
31
•A binder Intent is identified by the action string and data Uri!
!
•onBind() and onUnbind() only called once per unique
Intent
•START_STICKY will give a null
Intent when Service is
restarted by the system
•Binder calls run on local thread for process-local service