buder

2018-04-11 activity周期

android相机开发

 

1.Android wifi热点连接过程

 


2.bindservice和AIDL
https://blog.csdn.net/zhou_wenchong/article/details/51302574

 

3.Android短信还原代码


4.通话记录备份还原

https://blog.csdn.net/yin1031468524/article/details/58595960
https://blog.csdn.net/hb8676086/article/details/50357346
https://blog.csdn.net/yaoming168/article/details/51997859


http://mft.iteye.com/blog/1845054

5.ContentProvider ApplyBatch()
代码中使用,添加
https://blog.csdn.net/mylzc/article/details/6794400

 

6.Can't create handler inside thread that has not called Looper.prepare()

https://blog.csdn.net/chenaini119/article/details/43792931
https://www.cnblogs.com/jingmo0319/p/5730963.html

 

7.
异常栈
---------------------------------------------
java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
at android.os.Handler.(Handler.java:204)
at android.os.Handler.(Handler.java:118)
at cn.nubia.flycow.compatible.ApkSyncManager$1.(ApkSyncManager.java:110)
at cn.nubia.flycow.compatible.ApkSyncManager.(ApkSyncManager.java:110)
at cn.nubia.flycow.compatible.ApkSyncManager.getInstance(ApkSyncManager.java:103)
at cn.nubia.flycow.controller.WifiAndApControlManager.connectHotspotClient(WifiAndApControlManager.java:292)
at cn.nubia.flycow.controller.wifi.WifiConnection$2.run(WifiConnection.java:152)
at java.lang.Thread.run(Thread.java:764)


8.
android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@559b64f is not valid; is your activity running?
at android.view.ViewRootImpl.setView(ViewRootImpl.java:754)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:347)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:94)
at android.app.Dialog.show(Dialog.java:333)
at cn.nubia.flycow.ui.widget.NubiaCenterAlertDialog.show(NubiaCenterAlertDialog.java:318)
at cn.nubia.system.share.ui.CheckReceiveActivity.showDialog(CheckReceiveActivity.java:100)
at cn.nubia.system.share.ui.CheckReceiveActivity.access$000(CheckReceiveActivity.java:38)
at cn.nubia.system.share.ui.CheckReceiveActivity$1.run(CheckReceiveActivity.java:55)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:177)
at android.app.ActivityThread.main(ActivityThread.java:6651)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802)

 

应用启动优化:一种DelayLoad的实现和原理(下篇)
getWindow().getDecorView().post(new Runnable() {
@Override
public void run() {
myHandler.post(mLoadingRunnable);
}
});

作者:Gracker
链接:https://www.jianshu.com/p/45fab958e1d1
來源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

9.activity真正获取焦点
https://blog.csdn.net/kinglong68/article/details/50912934
onWindowFocusChanged重要作用
相关执行打印:
1: entry: onStart---->onResume---->onAttachedToWindow----------->onWindowVisibilityChanged--visibility=0---------->onWindowFocusChanged(true)------->

2. exit: onPause---->onStop---->onWindowFocusChanged(false) ---------------------- (lockscreen)

3. exit : onPause----->onWindowFocusChanged(false)-------->onWindowVisibilityChanged--visibility=8------------>onStop(to another activity)


10.activity所有回调
https://www.cnblogs.com/thismj/p/4974955.html

11.关于onPostCreate——Activity彻底运行起来之后的回调
http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2014/1022/1824.html


12.viewtreeobserver
https://www.jianshu.com/p/5b026ffc36f1

 

15.调用时间顺序:
getWindow.getDecorView和onresume 调用时间顺序
onResume -- onAttachedToWindow -- getWindow.getDecorView -- onWindowFocusChanged 此时activity获取焦点
getWindow.getDecorView和onresume
16.Android应用启动优化:一种DelayLoad的实现和原理(上篇)
http://androidperformance.com/2015/11/18/Android-app-lunch-optimize-delay-load.html

 

 

 

posted on 2018-04-11 15:02  buder  阅读(160)  评论(0编辑  收藏  举报

导航