2. 建立工程
a) 新建Android工程
b) 工程上右键 ---> Android Tools ---> Add Native Support...
/* Create SDP based on the current media channel. Note that, this function
* will not modify the media channel, so when receiving new offer or
* updating media count (via call setting), media channel must be reinit'd
* (using pjsua_media_channel_init()) first before calling this function.
/* The best bit: SDP negotiation function! */
PJ_DEF(pj_status_t) pjmedia_sdp_neg_negotiate( pj_pool_t *pool,
pjmedia_sdp_neg *neg,
pj_bool_t allow_asym)
{
pj_status_t status;
CSipsimple如何添加视频通信功能
//需要注释掉不用的
javac Control.java
//运行后出现:Control.class
//然后进入src目录执行
javah -jni com.lc.lcvideomeeting.helpers.Control
//发现生成com_lc_lcvideomeeting_helpers_Control.h和com_lc_lcvideomeeting_helpers_Control_Printer.h
JNI是JavaNativeInterface的缩写,通过JNI可以方便我们在Android平台上进行C/C++编程。要用JNI首先必须安装Android的NDK,配置好NDK环境之后就可以在Eclipse下进行C/C++开发了。
最近需要用到android的ndk,但是在eclipse中,一直提示Method 'NewStringUTF' could not be resolved(方法“NewStringUTF”无法被解析)。可问题是,jni.h等一系列的依赖库,都已经导入了,并且也能正常的使用build来编译出动态库文件。但是无奈的就是eclipse的cdt,仍旧会不停的提示这类的错误,导致整个项目没办法编译过去。