码迷,mamicode.com
首页 > 移动开发 > 详细

Binder in Android

时间:2016-01-10 22:32:22      阅读:259      评论:0      收藏:0      [点我收藏+]

标签:

 
  技术分享
 
 
使用binder,应用可以跟系统或者其他应用通讯 (it is used in almost everything that happens across processes in the core platform)
当应用要启动一个服务时,that process is going through the Binder to the Service Manager, look it up, and sends a reference to the App, then the App can go and requests remote calls from that object.
如一个应用想要实例化Windows Service, 使用如下语句:
WindowManager mWindowManager = (WindowManager)context.getSystemService(Context.WINDOW_SERVICE)
这个应用就可以调用WindowManager的方法:
  • mWindowManager.addView(mDecor, l);
    
    
  • mWindowManager.removeView(mDecor);
    
    
  • mWindowManager.updateViewLayout(mDecor, params);
 

Binder in Android

标签:

原文地址:http://www.cnblogs.com/CarrieCui/p/5119152.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!