Android APIs do not provide a direct way to answer calls. In fact, the communication functions of answering calls and making calls are implemented by sending AT commands at the lowest level, when sending the AT command, you need to open an at port device file in the/dev/directory of the Linux system. Different mobile phones and firmware have different file names, therefore, using this underlying method is troublesome (involving knowledge about program
My Android advanced tour ------> four call transfer scenarios, android advanced
The operator provides the following call transfer scenarios:
1. Always call transfer: No matter what status the current mobile phone is in, incoming
buttons
Preferencescreen Prefset = Getpreferencescreen ();
Msubmenuvoicemailsettings = (editphonenumberpreference) findpreference (Button_voicemail_key);
。。。。。。。
。。。。。。。
So it's almost done. To get whether or not to open this function to store and remove to the system database, next is to Framework/base/policy/src/com/android
/internal/policy/impl under the
Phonewindowmanager.java, we've been analyzing the Phonewindowmanager.java.
public int
a function named ril_timer_add executed the addToList function. I guess a function called ril_timer_add? What is a function? By using Source Insight to find the caller of the function, we found that the internalRequestTimedCallback function calls ril_timer_add. I think of the key point from the name: the current process is only used to "handle" telephone events, not to generate a telephone event by myself, A call event is generated by an object outsi
Knowledge points:
Android does not open an API for ending a call. to end a call, you must use AIDL to communicate with the telephone management service and call the API in the service to end the call. The method is as follows:1> copy the following files from the
setbackgroundresource () method to redraw the background of mmainframe.
2) The next incoming call will be followed by a large sticker used by the phone.---------Yes. This should be cleared at the end of the call. This is simple. Modify incallscreen. smali and find
.method private delayedCleanupAfterDisconnect()V
This method. Then find the return-void line of cod
【
This article is divided into three parts. This article focuses on the problem of "Full Screen incoming call dashboard". If you want to directly access technical details, go directly to article 2:
Http://blog.csdn.net/aimingoo/article/details/7939116
]
1. Phone call stickers on Android phones
========In fact, the
);Websettings. setsaveformdata (false );Websettings. setsavepassword (false );Websettings. setsuppzoom zoom (false );
// Do not use addjavascriptinterface () unless all of the HTML in this// Webview was written by you in general, Java and JavaScript cannot call each other unless you know that JavaScript code is safe.// The Java object that is bound runs in another thread and not in// Thread that it was constructed in. myjs is a custom interface for J
/CallCard;->showCachedBackground(Lcom/android/internal/telephony/CallerInfo;Lcom/android/internal/telephony/Call;)Z move-result v9 goto :cond_2 :cond_20## end fix.
4) Add the method required for the above Code: showcachedbackground ()---------The preceding two functions call a method. showcachedbackground () i
When developing an Android application, it is sometimes necessary to test the response of the application when making a call to an Android phone to send a text message. For example, to write a broadcast receiver to prompt the user to receive or process text messages, you need to send a text message to the phone to test. Here's a simple way to make a phone
Android Address Book Management 2 obtaining call records
The previous blog talked about getting contact information, and this blog is about getting call records.
Package cn. zxw. contact. domain;/*** call record * @ author zhan **/public class CallLogInfo {public String number; public long date; public int type; pub
js has any UI refresh operations, they must be performed in the ui thread.
For example, in the following example, we will call a Java method, which will pop up an Alert dialog box for android.
// Add something to the familiar AppActivity class. public class AppActivity extends Cocos2dxActivity {private static AppActivity app = null; @ Override public void onCrea
, if the Java method we call in js has any UI refresh operations, they must be performed in the ui thread.For example, in the following example, we will call a Java method, which will pop up an Alert dialog box for android.// Add something to the familiar AppActivity class. public class AppActivity extends Cocos2dxActi
This article summarizes a section of Android to get the call time program code, the need for friends to refer to.
We know that the phone length of the Android system should be callog, so it is advisable to check contactprovider, or Telephonyprovider
Service Test
Can start when the call starts service record current t
{.......... Public StaticAidl. IMyInterfaceAsinterface(Android.os.IBinder obj) {if(obj = =NULL)) {return NULL; }//Check binder is not in the current processAndroid.os.IInterface iin = obj.querylocalinterface (descriptor);if(((Iin! =NULL) (iininstanceofAidl. IMyInterface)) {return(Aidl. IMyInterface) iin); }return NewAidl. IMyInterface.Stub.Proxy (obj);}}First, what we should understand is that the IBinder returned is the IBinder we return in the service's Onbind () method, and then we
, or mclog is not reflected. I ("state = call_state_idle"); break; default: Break ;}}}
Oncallstatechanged is a callback method, and incomingnumber is the incoming call number.
The above method is only suitable for listening for incoming calls, not for power-off. To listen for power-off, you need to add additional items in the above method.
Above four, has implemented the interface design, blacklist (whitelist add and delete with blacklist same, no longer repeat), enable monitoring switch, Timer intercept switch, and interception mode selection function, the following will realize the most core function of call Butler, that is, interception function.Main ideas :1. Set up the interception mode, there are mainly two, one is the blacklist mode, that is, to intercept only the number in the b
We know that the phone length of the Android system should be callog, so it is advisable to check contactprovider, or Telephonyprovider
Service Test
Can start when the call starts service record current time A, then stopself (); In addition, start the service again at the end of the call, get the current time B again, and compare time a with B.
String time = l
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.