9. ● Activities/fragments etc - they have a life cycle
● Activity will not be GC-ed
● Static references
○ become dangling "pointers"
○ m_staticActivity = staticFragment.getActivity()
Static References
29. ● Solves your problem
● Plays nicely with your current dependencies
● Dex method count
● Dependencies
● Maintenance
● Runtime permissions
Pick 3rd party lib checklist
35. ● Don't call private APIs by reflection
● Don't call private native methods (NDK/C level)
● Don't use Runtime.exec
● "adb shell am" to communicate with other process is not something
we want to support
System abuse
36. ● Don't abuse the system
● Know and use APIs
System abuse
38. ● API will be removed
● Your app will not work
● No way to update APIs and tools
Deprecation
39. ● There is a compelling reason to move
○ Security
○ Correctness
○ Performance
Deprecation
40. ● Removed at M (still available as dependency)
● Use HttpURLConnection
○ Simple API
○ Small size
○ Transparent compression
○ Response caching
Don’t use Apache Http Connection
41. ● Know and use APIs
● Refactor your dependencies
● Update your dependencies and tools
Deprecation