Automatic dialing program debugging process

Source: Internet
Author: User
If you want to implement an automatic dialing program, you can automatically enter a number after the dial-in, that is, you can support an Automatic Speech system of the 10086 class.

1. First tested
Intent Intent = New Intent (intent. action_call, Uri. parse ("Tel: 10086 "));
Startactivity (intent );
Dial-Up is supported, but the system dial number is displayed, and the following number can only be entered manually.
2. See
Telephonymanager Telmgr = (Telephonymanager) getsystemservice (telephony_service );  
Method Getitelephonymethod = Telmgr. getclass (). getdeclaredmethod ("getitelephony ");          
Getitelephonymethod. setaccessible (true );  
Itelephony Itelephony = (Itelephony) Getitelephonymethod. Invoke (telmgr, (Object []) null );  
Itelephony. Call ("10086 ");
I cannot find the definition of itelephony, And I am searching for it online. Someone finally pointed out that datacomandroidinternalte In the SDK Add the data directory to build path under lephony, and we can see that Dex has repeatedly introduced an error.
It is awkward to introduce only the Telephony directory for compilation. The dial is also displayed.
3. another crazy search, finally found that someone on the Internet pointed out that as long as datalayoutlib is introduced. jar, but an error occurs again. Dex reports the Java heap space and finds the solution to the Internet. The solution should be imported in the form of a user library. The problem is solved after the trial.
4.because I have never been able to solve the problem, I suddenly want to decompile phone.apk in romand use dex2jar.
The following figure shows the events of the dial. Originally, sendburstdtmf in COM. Android. Internal. telephony. CallManager was used.
Dual-Tone Multi-frequency DTMF. After searching for related concepts, the buttons sent after the connection are DTMF!
This change reflected that the dog could not find the sendburstdtmfloud, and then looked at phone.apk. The underlying layer also called com. Android. Internal. telephony. Phone, And here senddtmf. Use the phone interface instead.
5. Use phonefactory. getdefaultphone (); to return the phone. The result is that phonefactory. getdefaultphone must be called from Looper thread.
It turns out that the permissions are insufficient. manifest is added to Android: shareduserid = "android. uid. Phone" and application is added to Android: Process = "com. Android. Phone ".
Unable to install install_failed_shared_user_incompatible. This time the signature is incorrect. We need to use platform. x509.pem and platform. pk8 for a long time. I still don't know where to find it. What can I do if the versions are different.
Finally, find it under cyanogenmod/android_build/target/product/security/, sign it, and use it in the simulator.
6. Test the actual mobile phone. How to install it on the mobile phone is a big problem. Later, find "ADB-s device name install xxx.apk" and specify to install the mobile phone when both the simulator and mobile phone exist.
Installation reports install_failed_invalid_install_location. It was originally installed under/system/APP and can only be copied to the specified directory on the mobile phone. The installation does not respond, because the installation does not know how to debug it.
When I restarted my cell phone, I got an answer and tested it again. After successfully dialing 10086, I sent a button and got a reply. No dial was displayed.
 

 

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.