Welcome![Sign In][Sign Up]
Location:
Search - imyservice

Search list

[OS programiMyService

Description: 自己写的服务程序,将程序注册为服务,可以在此基础上扩展其他功能-himself wrote the service procedures, procedures for registration services, on the basis of the expansion of other functions
Platform: | Size: 8732 | Author: 张丰年 | Hits:

[OS programiMyService

Description: 自己写的服务程序,将程序注册为服务,可以在此基础上扩展其他功能-himself wrote the service procedures, procedures for registration services, on the basis of the expansion of other functions
Platform: | Size: 8192 | Author: 张丰年 | Hits:

[JSPaidl

Description: 这里主要讲解一下服务器端回调客户端的步骤: 1、写一个ITaskCallback.aidl文件,该文件中定义了一些需要服务器端调用的函数接口 2、写一个IMyService.aidl文件,里面加两个接口用于注册和取消ITaskCallback.aidl文件中定义的接口 void registerCallback(ITaskCallback cb) void unregisterCallback(ITaskCallback cb) 3、定义MyService类,该类继承Service,在该类中定义RemoteCallbackList变量,用于注册ITaskCallback对象, 这样服务器端才知道哪些函数可以调用;在该类中还要定义一个MyServiceImpl继承IMyServcie.Stub, 并实现registerCallback()和unregisterCallback()方法。 4、在客户端实现ITaskCallback接口(当然先要把ITaskCallback.aidl文件及其目录copy到客户端工程中)-Here mainly explain the steps the server callback client: 1. Write a ITaskCallback.aidl file that defines some function interface requires a server-side call 2. Write a IMyService.aidl file, which added two interfaces interfaces for registration and cancellation ITaskCallback.aidl defined in the file         void registerCallback (ITaskCallback cb)         void unregisterCallback (ITaskCallback cb) 3, the definition of MyService class that inherits Service, RemoteCallbackList variable in the class definition for registration ITaskCallback objects       Thus the server to know what functions can be invoked also define a MyServiceImpl in the class inheritance IMyServcie.Stub,       And implement registerCallback () and unregisterCallback () method. 4, in the client implementation ITaskCallback interface (of course first put ITaskCallback.aidl file and directory copy to the client project)
Platform: | Size: 96256 | Author: 李里 | Hits:

CodeBus www.codebus.net