Due to System Restrictions, only the voice of the microphone can be recorded, and the voice of the other speaker cannot be recorded. You may need to change the kernel to implement two-way recording;
When the phone is connected and the phone is hung up, shake it down;
Use broadcast receiver to enable auto-start;
Service Code:
Package com. eboy. phonelistener;
Import java. Io. file;
Import Android. App. Service;Import Android. content. context;Import Android. content. intent;Import Android. Medi
I think that writing articles must be written to be useful, you have to have their own ideas, about the call to the electric monitoring will follow the following three questions to expand1. What is the use of monitoring incoming calls to power?2, how to monitor, call to the same way to monitor the electricity?3, actual combat, what needs special attention to the place?Listening to incoming calls to power what?1, can be heard on the phone to make a logo, tell the user this phone is fraud, marketi
mixed with proguard, but the problem is not big, although the display is meaningless function name but does not affect our analysis code flow.
Analysis of 2.2.1 Class B
From the OnCreate () code, we begin with Class B:
Class B provides a common constructor public B (Context Paramcontext), a private member function private String B (), and a publicly owned member function public final void a ().
B (): Obtain some information about the device through Te
Introduction to the Build classThis class is a class that acquires some initialization information for a device, and the primary information for that class is obtained through some static fields:
public static final String
BOARD
The name of the underlying board, like "goldfish". (Equipment Manufacturer)
public static final String
BOOTLOADER
The system bootloader version number.
public static final String
BRAND
The brand
Below I from the perspective of Android development, simply write how to get mobile device information and mobile phone numberPreparation conditions: An Android phone, mobile SIM card to ensure plug-in phone, Eclipse ADT and ANDROID-SDK development environmentFirst step: Create a new Android project (Jinshantest),and need to add permissions in the project's Androidmanifest.xml fileLegend:Step Two: Create a new tool class Phoneinfo.java1.package com.jinshan.test; 2.3. 4.import Android.content
can make a call with the activity action, you cannot hang up the phone using the usual method. However, the use of Java reflection technology is to implement a method of hanging up the phone through the program.The following interfaces are available from the Android SDK Source:Com,android.internal,telephony. Itelephony, external cannot be accessed directly, this interface provides a Itelephony.endcall method:Although the Itelephony object cannot be accessed directly. However, the
, "unconnect ");
// Unconnect Network
} Else {
// Connect Network
}
}
};
2. Register a handler in an appropriate place. You can register it in the program and call the following function in oncreate:Copy the Code as follows:
Intentfilter = new intentfilter ();
Intentfilter. addaction (connectivitymanager. connectivity_action );
Registerreceiver (connectionreceiver, intentfilter );
3. When appropriate, cancel the registration of the handler. You can cancel the registration in the program and call
license is distributed on an "as is" basis,* Without warranties or conditions of any kind, either express or implied.* See the license for the specific language governing permissions and* Limitations under the license.*/
Package com. Android. Contacts. update;
Import Android. App. alertdialog;Import Android. App. keyguardmanager;Import Android. App. progressdialog;Import Android. content. asyncqueryhandler;Import Android. content. contentresolver;Import Android. content. context;Import Android.
return.
1.2.2.3 carrier Information
The carrier information includes the IMEI and mobile phone number.AndroidProvides the operator management class (telephonymanager). You can use telephonymanager to obtain carrier-related information. The key code for implementation is as follows:
Java code:
Public static string fetch_tel_status (context CX ){String result = NULL;Te
(CONNECTIVITY_SERVICE );NetworkInfo mobNetInfo = connectMgr. getNetworkInfo (ConnectivityManager. TYPE_MOBILE );NetworkInfo wifiNetInfo = connectMgr. getNetworkInfo (ConnectivityManager. TYPE_WIFI );If (! MobNetInfo. isConnected ()! WifiNetInfo. isConnected ()){Log. I (TAG, "unconnect ");// Unconnect network} Else {// Connect network}}};
2. Register a handler in an appropriate place. You can register it in the program and call the following function in onCreate:IntentFilter intentFilter = new I
(ConnectivityManager. TYPE_MOBILE );NetworkInfo wifiNetInfo = connectMgr. getNetworkInfo (ConnectivityManager. TYPE_WIFI );
If (! MobNetInfo. isConnected ()! WifiNetInfo. isConnected ()){Log. I (TAG, "unconnect ");// Unconnect network} Else {
// Connect network}}};
2. Register a handler in an appropriate place. You can register it in the program and call the following function in onCreate:
IntentFilter intentFilter = new IntentFilter ();IntentFilter. addAction (ConnectivityManager. CONNECTIV
The mobile phone signal information in androi can be obtained through the TELEPHONY_SERVICE provided by the system.
[Java]TelephonyManager tel = (TelephonyManager) getSystemService (Context. TELEPHONY_SERVICE );
TelephonyManager can listen to PhoneStateListener, which provides[Java]OnSignalStrengthsChanged mobile phone signal changeOnServiceStateChanged mobile se
Android operator and Network Type Analysis
For some requirements, you need to obtain the carrier and network type, and analyze the carrier and network type.
First, we will throw some nonsense definitions:
GSM: The Global System of Mobile communication is a well-known GSM, the most widely used Mobile phone standard.
CDMA: Code Division Multiple Access (CDMA) is a new and mature wireless communication technology developed from the Spread Spectrum Communication Technology, a branch of digital tech
/(double) dens;
Double hi= (double) height/(double) dens;
Double x = Math.pow (wi,2);
Double y = Math.pow (hi,2);
Double screeninches = math.sqrt (x+y);
Again, the code above needs to be able to get an activity.
Third, get the app name
public static string Getappname {
string appName = "";
try {
Packagemanager Packagemanager = Context.getpackagemanager ();
ApplicationInfo applicationinfo = Packagemanager.getapplicationinfo (Context.getpackagename (), 0);
AppName = (
First, get the current mobile phone number * * Get current cell phone number/public String Getlocalnumber () {Telephonymanager Tmanager = (Telephonymanager) . Getsystemservice (Telephony_service); String number = Tmanager.getline1number (); ; return number; }
Second, check if there is a network connection
public boolean checkinternet () {Connectivitymanager cm = (Connectivitymanager) this. Getsyst
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.