共 6 篇文章 |
|
<application android:icon="@drawable/icon" android:theme="@android:style/Theme.NoTitleBar"> <activity android:name=".FormStuff" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category a... 阅2018 转0 评0 公众公开 12-07-20 16:55 |
使用android中的AIDL让Service与Activity通信使用android中的AIDL让Service与Activity通信。import android.os.通过aidl总算实现了Service与Activity的通信,写起来麻烦点,使用诸如ContentProvider,Broadcast等也可以实现.这样做很像是在使用MVC设计模式(Activity负责View,Service以及其他类负责Model,aidl(ServiceConnection)负责Controller),... 阅319 转0 评0 公众公开 12-07-20 16:54 |
Android组件间的交互和进程间IPC通信Android组件间的交互和进程间IPC通信。Android的组件和进程间通信都建立在一种基于称为Intent的消息基础之上。Android在做Intent-Filter匹配的时候,Intent的Action属性匹配到Intent-Filter中的任何一个action节点,就表明拥有这个Intent-Filter的组件能够处理这种消息;而对于Category来讲一个Intent中的所... 阅98 转1 评0 公众公开 12-07-20 16:54 |
android Service Binder交互通信实例android Service Binder交互通信实例。首先,要创建一个Service类,该类继承android的Service类。import android.app.import android.os.public class ServiceBinder extends Binder implements ICountService{@Overridepublic int getCount() {return count;@Overridepublic void onServiceConnected(Compo... 阅221 转1 评0 公众公开 12-07-20 16:48 |
接触过android的人都知道Binder服务调用是android系统的基础。它定义在frameworks/base/include/binder/IInterface.h:template<typename INTERFACE>class BnInterface : public INTERFACE, public BBinder{public: virtual sp<IInterface> queryLocalInterface(const String16& _descriptor); virtual const String16&am... 阅2417 转11 评0 公众公开 12-07-20 15:16 |
IBinder机制之IBinder机制之--认识Android环境里的两种Service(转)例如,基于上述途径,ActivityManagerService就会登记为可远距呼叫的系统service。执行应用程式时,就由ActivityManagerService来将SDK service(如myPlayerService.java类别)登记到Binder Driver里,于是应用程式里的Activity等类别就能使用bindService()函数来系结(bind)到m... 阅400 转1 评0 公众公开 12-07-20 13:51 |