Today I want to write a simple phone call.ProgramWhen I wrote it out, I always reported an error. I tracked it and found the error. I didn't have the permission. I used to say it when I was reading the book, but I still forgot it when I was writing it, I will write more in the future. It is easy to say in the book, but it will be quite troublesome to use! The following is a summary of the errors that have been written today!
When using Android development programs, you often need to call system services. For example, to call a phone number, you need:
<Uses-Permission Android: Name = "android. permission. call_phone "/> is equal to adding an access permission for the dial-up call. If you do not add this permission, you cannot use the dial-up service. If a catch error occurs, the following error occurs:
13:24:12-08. 041: INFO/info (487): Permission Denial: Starting intent {act = android. intent. action. call dat = Tel: 124 CMP = com. android. phone /. outgoingcallbroadcaster} from processrecord {43f01930 487: COM. callphonetest/10036} (pid = 487, uid = 10036) requires android. permission. call_phone is mainly used to deny the use of the call service. Of course, if you want to call an email or text message, you need to introduce the corresponding service, such as email: You need to add the following permissions:
Android. Permission. InternetIntentService. And so on. This needs to be summarized in the use process!