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

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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值