app进程
文章平均质量分 93
不吹空调的咸鱼
这个作者很懒,什么都没留下…
展开
-
探究android-aidl---bindService的绑定及其内部原理
bindService的用法 private IMyAidlInterface iMyAidlInterface; private void bindService() { Intent intent = new Intent(); intent.setComponent(new ComponentName("com.example.aidlserver", "MyService")); bindService(intent, service原创 2021-03-12 12:33:27 · 9153 阅读 · 0 评论 -
探究StartService的启动与其原理
前言启动服务-基本使用通过将 Intent 传递给 startService() 或 startForegroundService(),从 Activity 或其他应用组件启动服务。Android 系统会调用服务的 onStartCommand() 方法,并向其传递 Intent,从而指定要启动的服务。Intent intent = new Intent(this, MyService.class);startService(intent);MyService.javapublic class原创 2021-03-05 16:49:40 · 8692 阅读 · 2 评论 -
binder应用层的学习——ADIL的使用与原理
使用aidl首先看下应用使用aidl时的代码:①在服务端和客户端创建aidl文件服务端// IMyAidlInterface.aidlpackage aidl.com.example.test;interface IMyAidlInterface { void hi(String s); String bye(int s); void hello(int s);}客户端// IMyAidlInterface.aidlpackage aidl.com.exampl原创 2021-02-24 17:43:43 · 8508 阅读 · 0 评论 -
探索APP进程的启动流程(二)完结篇
首先回顾下冷启动的流程图:共有四个步骤:1.launcher进程通过binder请求ams启动Activity,AMS进程查询内存中是否存在该进程。2.内存中无相应进程,ams通过socket发送创建进程命令和相关资料到zygote进程。3.zygote进程收到socket信息后,fork子进程,创建出ActivityThread的进程(目的进程)4.ActivityThread通过binder把新建的进程信息与AMS进行相关联。在上一篇博客中,介绍了从用户点开app到发送指令给zygote进原创 2021-01-06 17:14:51 · 8395 阅读 · 0 评论 -
探索APP进程的启动流程(一)
未开始原创 2021-01-06 17:15:02 · 8682 阅读 · 0 评论