Linphone图书馆

Linphone libraries

Linphone 现在提供一个带有 .jar 文件的 SDK 和三个带有 .so 库的文件夹。 我如何在 Eclipse 中使用这些文件?我尝试将这些文件复制到 libs 文件夹并添加 jar 依赖项,但是当我第一次在我的代码中使用 libphone 对象时,我得到一个空指针异常。我该如何解决这个问题?

我正在使用 windows 7 64 位和 windows 8

提前致谢

将 linphone.jar 放入 libs 文件夹

ProjectRoot>app>libs>linphone.jar

将包含 .so 文件的所有其他文件夹放入 int

ProjectRoot>app>src>main>jniLibs

并在您的清单文件中包含这些权限

    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.READ_CONTACTS" />
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS" />
    <uses-permission android:name="android.permission.CALL_PHONE" />
    <!-- Needed to allow Linphone to install on tablets, since android.permission.CALL_PHONE implies android.hardware.telephony is required -->
    <uses-feature
        android:name="android.hardware.telephony"
        android:required="false" />

    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.CAMERA" />
    <!-- Needed to allow Linphone to install on tablets, since android.permission.CAMERA implies android.hardware.camera and android.hardware.camera.autofocus are required -->
    <uses-feature
        android:name="android.hardware.camera"
        android:required="false" />

    <uses-permission android:name="android.permission.READ_LOGS" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <!-- Needed to store received images if the user wants to -->
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <!-- Needed to use our own Contact editor -->
    <uses-permission android:name="android.permission.WRITE_CONTACTS" />
    <!-- Needed to route the audio to the bluetooth headset if available -->
    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BROADCAST_STICKY" />
    <!-- Needed to pre fill the wizard email field (only if enabled in custom settings) -->
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
    <uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
    <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
    <uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />

现在您已完成设置。

从这里开始使用linphone文档

Linphone's Java Wrapper Documentation

以及原生支持

Liblinphone C API documentation

要开始,我建议您从实施 LinphoneCoreListener

开始