0

我想在我现有的 Android 应用程序中嵌入聊天功能。它已经包含登录凭据。因此,我尝试将 Quickblox SDK 添加到我现有的 android 项目中,该项目是从 GitHub Link GitHub下载的

另外,在我现有的应用程序中是否也需要添加在 GitHub链接中发布的 Q-municate Android 源代码?

或者没有那个 Q-municate 源代码,我只能通过在我现有的应用程序中导入 Quickblox SDK 来开发聊天功能吗?

这是我项目的顶级 build.gradle 文件

// 顶级构建文件,您可以在其中添加所有子项目/模块通用的配置选项。

buildscript {
    repositories {
        jcenter()
    }

    def qbSdkVersion = '3.2.0'
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.3'
        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
        classpath 'org.greenrobot:greendao-gradle-plugin:3.1.0'
        compile "com.quickblox:quickblox-android-sdk-chat:$qbSdkVersion"
        //include only necessary module dependency, all transitive modules will be included automatically

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}


allprojects {
    repositories {
        jcenter()
        maven {
           url = "file://C:/Users/HP/Downloads/quickblox-android-sdk-releases-master"
            // url "https://github.com/QuickBlox/quickblox-android-sdk-releases/raw/master/"
        }
        mavenCentral()
    }
}


task clean(type: Delete) {
    delete rootProject.buildDir
}

这是模块级 build.gradle

apply plugin: 'com.android.application'
apply plugin: 'org.greenrobot.greendao'
apply plugin: 'com.neenbedankt.android-apt'

android {
    compileSdkVersion 24
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "com.sensei.app"
        minSdkVersion 15
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
greendao {
    schemaVersion 1
}



dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:24.2.0'
    compile 'com.android.support:cardview-v7:24.0.+'
    compile 'com.android.support:design:24.2.0'
    compile 'com.squareup.retrofit2:retrofit:2.1.0'
    compile 'com.squareup.retrofit2:converter-gson:2.0.2'
    compile 'org.greenrobot:greendao:3.1.1'
    compile 'org.greenrobot:eventbus:3.0.0'
    compile 'com.jakewharton:butterknife:8.4.0'
    сompile "com.quickblox:quickblox-android-sdk-chat:$qbSdkVersion" //include only necessary module dependency, all transitive modules will be included automatically
    сompile "com.quickblox:quickblox-android-sdk-content:$qbSdkVersion"
    сompile "com.quickblox:quickblox-android-sdk-messages:$qbSdkVersion"
    сompile "com.quickblox:quickblox-android-sdk-customobjects:$qbSdkVersion"

    debugCompile 'com.facebook.stetho:stetho:1.4.1'
    debugCompile 'com.facebook.stetho:stetho-okhttp3:1.4.1'
    apt 'com.jakewharton:butterknife-compiler:8.4.0'

}
4

1 回答 1

0

访问此链接以与 QuickBlox 进行简单的聊天功能集成

https://github.com/QuickBlox/quickblox-android-sdk/tree/master/sample-chat

您需要在项目中添加用于聊天功能的代码,例如一对一聊天或群聊,所有这些都来自上述示例。

于 2016-12-27T09:10:34.530 回答