首页 > 移动平台 > 详细

Binder in Android

时间:2016-01-10 22:29:46      阅读:297      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!