问题
I am trying to run a simple SIP program using android 2.3 emulator.
When i am trying to create an instance of SipManager i get a return value as null(which means the SIP API isn't supported).
Pls suggest how i can test SIP in emulator.
回答1:
I got this working for me thanks to the Issues list link below :
http://code.google.com/p/android/issues/detail?id=13037
and the thing which worked for me is in sub link in this thread.
How to enable SIP in Android 2.3 emulator.
- Make the system partition writeable. Open a cmd window and enter these:
emulator -avd -partition-size 128 adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock1 /system
- Enable SIP support:
Copy 2 XMLs from AOSP into text files: android.software.sip.xml, android.software.sip.voip.xml, and copy XMLs to the emulator:
adb push android.software.sip.voip.xml /system/etc/permissions adb push android.software.sip.xml /system/etc/permissions
- Disable config_sip_wifi_only in config.xml: false
The repacked resource file can be found here. Copy it to the emulator:
adb push framework-res.apk /system/framework
- Close emulator and start it again in normal mode.
Or... these steps in one: download the AVD system.img and copy into the ....android\avd\.avd folder.
Known issue: incoming calls are not working yet.
来源:https://stackoverflow.com/questions/4603465/sipmanager-newinstance-not-working-for-android-gingerbread