Follow the previous article and say some of the problems that occur during the creation of the IP dialer.
1) A warning will be reported when a call is made to the phone at the start of the listener:
Permission denial:receiving Intent {act=android.intent.action.new_outgoing_call flg=0x10000010 (have extras)} to Com.he ng.ipdail/. Outcall requires Android.permission.PROCESS_OUTGOING_CALLS due to Sender Com.android.phone (UID 1001)
From the general meaning can be seen, in order to achieve the monitoring function we need to listen to the permission to dial out the phone. Locate the manifest file and add the following permissions: Android.permission.PROCESS_OUTGOING_CALLS. Just load it up and there's no problem.
2) do not display logcat. The problem was just discovered last night. To view the log Discovery form is gone, so find the next information, in a blog found the answer, the process is this: Preferences->android->logcat then set into verbose, a:
3) The simulator does not have a dialing function.
This is more depressed, looking for a very long time have not found. Finally found in the text message dialing function, but only can dial the existing phone, it may be my software has a problem. Also hope the big God pointing twos.
4) the simulator bridge disconnects. This should be a system problem, I built two simulators before. These days the main use of 5554, but last night loaded into the program is always hanging to 5556, tried several times, and then asked the next team leader. Say you need to restart ADB, first enter DDMS (can be found in Windows. The front also said this), find threads, Direct:
5) Finally, add the last mentioned Listener Class (outcall). It inherits the Broadcastreceiver and realizes the function of receiving events, as one of the four components. We need to configure it in the manifest file:
<!--defines a broadcast recipient who cares about the event "new outgoing calls"-- <receiver android:name=. Outcall "> <intent-filter > <action android:name=" Android.intent.action.NEW_OUTGOING_CALL "/ > </intent-filter> </receiver>
This definition is under the application node, first specifying the name (". Outcall), '. ' Represents the current package name; <intent-filter > is the corresponding intent filter that sets the broadcast event that the current listener cares about by specifying an action. We use the New_outgoing_call, of course, can also set other care events, in this case just need to care about the outgoing phone is OK.
Android from ignorance to knowing--no.6