end call
来源:互联网 发布:csgo国际服除了淘宝 编辑:程序博客网 时间:2024/05/16 13:48
//类加NeighboringCellInfo.aidl和ITelephony.aidl.
package cn.itcast.endcall;import java.lang.reflect.InvocationTargetException;import java.lang.reflect.Method;import com.android.internal.telephony.ITelephony;import android.app.Activity;import android.os.Bundle;import android.os.IBinder;import android.os.RemoteException;import android.view.View;public class DemoActivity extends Activity {ITelephony iTelephony; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); try {// 获取系统电话管理的服务 //反射,把系统类里面的方法获取,Method method = Class.forName("android.os.ServiceManager").getMethod("getService", String.class);//得到IBinder对象.IBinder binder = (IBinder)method.invoke(null, new Object[]{TELEPHONY_SERVICE});//返回到接口.iTelephony = ITelephony.Stub.asInterface(binder);} catch (Exception e) {// TODO Auto-generated catch blocke.printStackTrace();} } //方法. public void endcall(View view){ try {//iTelephony.endCall();//点击按钮可以call 123.iTelephony.call("123");} catch (RemoteException e) {// TODO Auto-generated catch blocke.printStackTrace();} //iTelephony.call("123"); }}
0 0
- end call
- end ()
- .end()
- end
- END
- $.end()
- end()
- const at the end of function and passing const object in a function call
- call
- call
- call
- call
- call
- call
- call
- call
- end-to-end 理解
- The End.
- Android 开机启动的service
- Linux查看系统cpu个数、核心书、线程数
- 移动客户端谈入手百度推送经验
- Linux网卡中断使单个CPU过载
- VM-Linux配置问题及常用linux命令
- end call
- 单点登录之CAS简单介绍
- memcached安装及使用
- 在Jquery中怎么判断input的类型
- XP中“登录失败:未授予用户在此计算机上的请求登录类型”的解决
- 把文件存放在SDCard
- swift UITableView 表视图
- 安卓随手笔记十:(listview分页功能)
- Cocos2d-x学习(一):HelloWorld