机器人 小姜饼 上开发 网络电话

来源:互联网 发布:java 读取命令行参数 编辑:程序博客网 时间:2024/05/06 15:09

developing voip/sip applications on android gingerbread.

  1. develop an sip application.
    1. in AndroidManifest.xml, add permission requests as following,
      <uses-permission android:name="android.permission.INTERNET"></users-permission>
      <uses-permission android:name="android.permission.USE_SIP"></users-permission>
    2. use SipManager. check SipManager.isVoipSupported() (isApiSupported() is encluded) or SipManager.newInstance(this).
  2. enable sip in emulator. (according to http://xilard.hu)
    1. download system.img for SDK 2.3.3/API 10 from http://xilard.hu/emulator233_sip_files/system.img
    2. the following steps should work, too. but in my experience, system.img was not saved, maybe because system.img is in SDK's directory, but not in AVD's, so all the modifications are useless.
    3. in eclipse, menu Run->Run Configurations..., add following Additional Emulator Command Line Options in Target tab, or, you will not be able to add anything to avd's /system,
      -partition-size 128
    4. run the application in eclipse with emulator
    5. adb remount
    6. enter frameworks/base/data/etc of gingerbread
    7. adb push android.software.sip.xm /system/etc/permissions
    8. adb push android.software.sip.voip.xm /system/etc/permissions
    9. disable config_sip_wifi_only in config.xml, and repack resource file. or download the result for SDK 2.3.3/API 10 from http://xilard.hu/emulator233_sip_files/framework-res.apk.
    10. adb push framework-res.apk /system/framework
    11. turn the emulator off
  3. enable sip in sdk
    1. in device of gingerbread, there is usually a mk file configuring product information. it calls product/generic.mk. use following line to add one of the two xml files to system.img
      PRODUCT_COPY_FILES += frameworks/base/data/etc/android.software.sip.xml:system/etc/permissions/a ndroid.software.sip.xml
    2. when running gingerbread, just use adb to remount and push the two xml files to the phone