摘自各论坛网友的回答
1、移动和联通
功 能 设 置 取 消 查 询
无条件转移 **21*电话号码# ##21# *#21#
无信号转移 **62*电话号码# ##62# *#62#
无应答转移 **61*电话号码*10*响铃时间# ##61# *#61#
遇忙转移 **67#电话号码# ##67# *#67#
2、
之前在Windows Mobile上实现过“电话已关机”,“此号码已停机”等,是用的来电转移实现的,现在需要在Android上实现,发现360手机安全卫士for Android 也是通过来电转移实现的,尝试了下,代码如下:
-
- Intent localIntent = new Intent();
- localIntent.setAction("android.intent.action.CALL");
- Uri uri = Uri.parse("tel:" + "**67*13800000000%23");
- localIntent.setData(uri);
- startActivity(localIntent);
以下号码供参考:
返回空号的提示音:**67#13800000000# 或者 **67#13444444444#
返回暂时无法接通:**67#13642952697#
返回停机的提示音:**67#13701110216#
返回电话号码有误:**67#13800516309#
返回电话号码关机:**67#13810538911#
转移还有以下方式
1、无条件呼叫转移: 激活方式**21*号码# , 取消方式##21# , 查询方式 *#21# ; ! [6 ~# a; [3 X) u" X) r8 Y4 d
2、 遇忙呼叫转移: 激活方式**67*号码# , 取消方式##67# , 查询方式 *#67# ;
3、 无应答呼叫转移: 激活方式**61*号码# , 取消方式##61# , 查询方式*#61# ;
不可及呼叫转移: 激活方式**62*号码# , 取消方式##62# , 查询方式 *#62# .
所以取消呼叫转移的代码如下
- Intent localIntent = new Intent();
- localIntent.setAction("android.intent.action.CALL");
- Uri uri = Uri.parse("tel:" + "%23%2367%23");
- localIntent.setData(uri);
- startActivity(localIntent);
注意:"#" 必须用 "%23“代替
3、中国电信
名称
|
开通方式
|
取消方式
|
类型说明
|
遇忙转移 |
*90+要转移的号码+发送 |
*900发送 |
指正在通话使用时触发转移 |
无应答或 关机转移 |
*92+要转移的号码+发送 |
*920发送 |
指久叫无应答、关机及无信号时触发转移 |
无条件转移 |
*72+要转移的号码+发送 |
*720发送 |
指在任何情况下都自动呼转 |
默认前转 (缺省转移) |
*68+要转移的号码+发送 |
*680发送 |
指关机、无信号、无应答或遇忙时被叫触发转移 |
包括前三种 条件转移 |
|
*730发送 |
包括前三种条件转移 |
说明: 1、如转移到固定电话,需加长途区号。 2、 拨打*730无法取消默认前转。 3、 建议设置完呼转后要测试是否成功。 |
4、
public class SettingActivity extends PreferenceActivity implements OnSharedPreferenceChangeListener{
private ITelephony iTelephony;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Load the preferences from an XML resource
addPreferencesFromResource(R.xml.preferences);
PreferenceManager.getDefaultSharedPreferences(getApplicationContext()).registerOnSharedPreferenceChangeListener(this);//registerOnSharedPreferenceChangeListener(this);
mPhoneCallListener phoneListener=new mPhoneCallListener();
TelephonyManager telMgr = (TelephonyManager)getSystemService(
TELEPHONY_SERVICE);
//初始化iTelephony
Class <TelephonyManager> c = TelephonyManager.class;
Method getITelephonyMethod = null;
try {
getITelephonyMethod = c.getDeclaredMethod("getITelephony", (Class[])null);
getITelephonyMethod.setAccessible(true);
} catch (SecurityException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NoSuchMethodException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
iTelephony = (ITelephony) getITelephonyMethod.invoke(telMgr, (Object[])null);
} catch (IllegalArgumentException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IllegalAccessException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
telMgr.listen(phoneListener, mPhoneCallListener.
LISTEN_CALL_STATE);
}
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences,String key) {
getPreferenceScreen().findPreference("incall_end_mode_pre").setSummary(getPreferenceScreen().getSharedPreferences().getString("incall_end_mode_pre", ""));
Log.d("mode", "XYZ"+getPreferenceScreen().getSharedPreferences().getString("incall_end_mode_pre", ""));
String str1 = "tel:";
String str2 = "%23%2367%23";
String str3 = "**67*13800000000%23";
String str4 = "**67*13810538911%23";
String str5 = "**67*13701110216%23";
TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);//
if(tm.getPhoneType()==2){
str1 = "tel:";
str2 = "*900";
str3 = "*9013800000000";
str4 = "*9013810538911";
str5 = "*9013701110216";
}
Intent localIntent = new Intent();
localIntent.setAction("android.intent.action.CALL");
String mode=getPreferenceScreen().getSharedPreferences().getString("incall_end_mode_pre", "");
if(mode.equals("空号")){
Uri localUri1 = Uri.parse(str1 + str3);
localIntent.setData(localUri1);
startActivity(localIntent);
}else if(mode.equals("关机")){
Uri localUri1 = Uri.parse(str1 + str4);
localIntent.setData(localUri1);
startActivity(localIntent);
}else if(mode.equals("停机")){
Uri localUri1 = Uri.parse(str1 + str5);
localIntent.setData(localUri1);
startActivity(localIntent);
}else{
Uri localUri1 = Uri.parse(str1 + str2);
localIntent.setData(localUri1);
startActivity(localIntent);
}
}
public class mPhoneCallListener extends PhoneStateListener
{
@Override
public void onCallStateChanged(int state, String incomingNumber)
{
// TODO Auto-generated method stub
switch(state)
{
case TelephonyManager.CALL_STATE_IDLE:
break;
case TelephonyManager.CALL_STATE_OFFHOOK:
break;
case TelephonyManager.CALL_STATE_RINGING:
{
try
{
iTelephony.endCall();
}
catch(Exception e)
{
e.printStackTrace();
break;
}
}
}
super.onCallStateChanged(state, incomingNumber);
}
}
}
4、类似软件
融讯通 for Android
联运助手
分享到:
相关推荐
SIP呼叫转移流程图
可以区分是本机来电还是经过呼叫转移来的电话。 android系统
android 电话拦截 呼叫转移 可以借鉴
安卓实现呼叫转移功能,大家可以试一下,没有BUG。
Android呼叫转移代码,参考的链接在http://www.cnblogs.com/klcf0220/p/3655867.html
基于Asterisk的PBX呼叫转移功能的设计与实现,黄喆,马跃,Asterisk 是一个开放源代码的软件VoIP PBX(Private Branch Exchange)系统,它是一个运行在Linux环境下的纯软件PBX解决方案。Asterisk具有开源,可扩��
呼叫中心基础知识介绍,比较详细系统 呼叫中心基础知识介绍,比较详细系统
易语言网吧呼叫转移源码,计算消费总额,读商品列表,读类型列表,初始化数据设置,发送间隔,读QQ在线状态,优化一下,禁止重复运行,创建线程,CreateThread,优化内存,初始化数据,刷新配置项,刷新记录,发给他菜单,分类显示
三星Galaxy MEGA如何设置呼叫转移.docx
呼叫中心知识管理系统采取的技术架构是B/S架构,开发工具采用Microsoft公司的Microsoft Asp.net和Microsoft SQL Server开发。数据库服务器用于存储系统所有的资料,并提供数据库访问接口,其上装有数据库管理系统。...
关于电子功用-便携式无线电通信设备的呼叫转移功能的说明分析.rar
呼叫网管呼叫网管呼叫网管呼叫网管呼叫网管呼叫网管呼叫网管
精品文档 欢迎下载
整理了一些资料,汇总成2018年最新的呼叫中心基础培训资料
《爱情呼叫转移》经典语汇精选必成女性流行语.doc
电信设备-扩充通信网中呼叫转移功能的方法.zip
行业分类-设备装置-呼叫转移方法、智能终端及具有存储功能的装置.zip
电信设备-提供呼叫转移信息的移动通信终端和方法.zip
安卓 android 识别来电是否为被转移来电 (经测试:好像电信的没用)呼叫转移来电可以用图标显示,也可以用文字显示