我想在我现有的Android应用中嵌入聊天功能。它已包含登录凭据。 所以,我尝试将Quickblox SDK添加到我现有的Android项目中,该项目是从GitHub Link下载的GitHub
此外,是否需要在我现有的应用中添加在GitHub link中发布的Q-municate Android源代码?
或者没有Q-municate源代码,我是否可以通过在My Existing App中导入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'
}
答案 0 :(得分:0)
访问此链接,了解与QuickBlox集成的简单聊天功能
https://github.com/QuickBlox/quickblox-android-sdk/tree/master/sample-chat
您需要在项目中添加聊天功能,例如一对一聊天或群聊,以及上述示例中的所有内容。