1. ITelephony接口和ISms接口以及AIDL
在我们的Android应用中,当需要实现电话拨号时,我们需要进行如下调用
ITelephony phone = (ITelephony)ITelephony.Stub.asInterface(ServiceManager.getService("phon"))
phone.dial("10086");
对于短信应用,我们需要的是调用SmsManager,代码如下
SmsManager manager = SmsManager.getDefault();
manager.sendTextMessage("10086",null,"hi,this is sms",null,null);
这里,SmsManager对ISms做了一层包装,实质上是通过调用
ISms simISms = ISms.Stub.asInterface(ServiceManager.getService("isms"));
simISms.sendRawPdu....
相关文章:
-
2022-01-16
-
2022-12-23
-
2022-12-23
-
2022-12-23
-
2021-12-06
-
2021-12-06
-
2021-12-17
-
2022-12-23
猜你喜欢
-
2021-10-19
-
2022-01-26
-
2021-06-23
-
2022-12-23
-
2022-12-23
-
2022-12-23
-
2021-12-23
相关资源
-
下载
2022-12-09
-
下载
2021-06-22
-
下载
2021-06-22