1. Androd request in the network, if the network after completion callback request, activity has been recovered, and how to deal with?
Examine knowledge:
- acitvity view relationships and life cycle & Memory Model
- How to prevent memory leaks (weak references, cancel and request a callback)
Solving knowledge:
- activity view life cycle https://www.jianshu.com/p/0a4cb44ce9d1
- acitvity view window relationship https://blog.csdn.net/freekiteyu/article/details/79408969
- Role of Context https://www.cnblogs.com/tsingke/p/9127758.html
- Weak references experiment
The default view held by activity (content) references, activity can be finish, but not destroyed;
mvp p can be held view by weak reference solve network problems return;
- kotlin cancel the callback process implemented by the Association (binding activity life cycle )
In experiment...