Activity中使用AIDL让Service与Activity通信.docVIP

  • 5
  • 0
  • 约 9页
  • 2016-12-03 发布于河南
  • 举报

Activity中使用AIDL让Service与Activity通信.doc

Activity中使用AIDL让Service与Activity通信

简易计算器,默认执行1+1的计算,点击go按钮执行计算,先看效果图,如下 首先建立一个ICallback.aidl文件,作为Activity中的回调方法 Java代码 // My AIDL file, named SomeClass.aidl package com.zhang.test.service; // See the list above for which classes need // import statements (hint--most of them) // Declare the interface. interface ICallback { // Methods can take 0 or more parameters, and // return a value or void. // Methods can even take other AIDL-defined parameters. //BankAccount createAccount(in String name, int startingDeposit, in IAtmService atmService); // All non-Java primitive parameters (e.g., int, bool, etc) require // a directio

文档评论(0)

1亿VIP精品文档

相关文档