Android 电话的反射调用机制实现静默接听电话(4)
来源:未知 责任编辑:责任编辑 发表时间:2013-12-01 14:14 点击:次
/**
* Disallow mobile data connections.
*/
boolean disableDataConnectivity();
/**
* Report whether data connectivity is possible.
*/
boolean isDataConnectivityPossible();
Bundle getCellLocation();
/**
* Returns the neighboring cell information of the device.
*/
int getCallState();
int getDataActivity();
int getDataState();
/**
* Returns the current active phone type as integer.
* Returns TelephonyManager.PHONE_TYPE_CDMA if RILConstants.CDMA_PHONE
* and TelephonyManager.PHONE_TYPE_GSM if RILConstants.GSM_PHONE
*/
int getActivePhoneType();
/**
* Returns the CDMA ERI icon index to display
*/
int getCdmaEriIconIndex();
/**
* Returns the CDMA ERI icon mode,
* 0 - ON
* 1 - FLASHING
*/
int getCdmaEriIconMode();
/**
* Returns the CDMA ERI text,
*/
String getCdmaEriText();
/**
* Returns true if CDMA provisioning needs to run.
*/
boolean getCdmaNeedsProvisioning();
/**
* Returns the unread count of voicemails
*/
int getVoiceMessageCount();
/**
* Returns the network type
*/
int getNetworkType();
/**
* Return true if an ICC card is present
*/
boolean hasIccCard();
}
然后建一个包
zy.phone
下面做反射调用
PhoneUtils.java
package zy.phone;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import Android.telephony.TelephonyManager;
import Android.util.Log;
public class PhoneUtils {
/**
* 从TelephonyManager中实例化ITelephony,并返回
*/
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>