Giter Club home page Giter Club logo

talk-android's Introduction

简聊 Android 客户端

开发环境

  • Android Studio 2.1
  • Android Ndk r10e

配置

  • 需要自己搭建运行环境,task-os服务端
  • app/build.gradle配置 如果需要release运行,首先需要在signingConfigs中配置您的keystore文件,在gradle.properties中配置RELEASE_STORE_PASSWORD=您的keystore的storePassword,RELEASE_KEY_ALIAS=您的keystore的KeyAlias, RELEASE_KEY_PASSWORD=您的keystore的keyPassword,然后如果需要你还需要在buildTypes里配置umeng_app_key,baidu_api_key
  • Constant.java配置 XIAOMI_APP_ID小米推送需要的APP_ID,XIAOMI_APP_KEY小米推送需要的APP_KEY, WECHAT_APP_ID 微信的APP_ID, WECHAT_APP_SECRET微信的SECRET,MIXPANEL_TOKEN Mixpanel需要的token,BUGLY_APP_ID腾讯bugly需要使用的APP_ID

以上配置看自己需求按需配置,当然如果你不配置也不影响运行

fir.im 测试版

发布 fir.im 测试版可以利用 fir 的 gradle 插件来实现一键自动打包上传。需要注意的是在需要在gradle.properties 文件中加上如下2行:

BUILD_FOR_FIR=true
FIR_TOKEN= //这个是gradle中使用插件发布到fir需要使用到的token

每次上传前需要更新项目的 versionCode 和 versionName,并将更新日志则填写在项目根目录的 fir-changelog.txt 文件中。运行 ./gradlew publishApkRelease 即可完成打包上传,teambition 的简聊话题内还配置有 fir.im 的 webhook,一旦 fir.im 有新的测试版发布就会有聚合消息。

渠道包打包

渠道分包采用 packer-ng-plugin 插件来实现快速打包。打包前需要在 gradle.properties 文件中加入商店配置文件路径 market=markets.txt markets.txt 语法如下:

anzhi#注释:安智市场
appchina
baidu
baiduAd#百度市场推广渠道

打渠道包的 gradle 命令是 ./gradlew apkProdRelease。在代码中读取渠道信息使用如下接口:

final String market = PackerNg.getMarket(Context);
AnalyticsConfig.setChannel(market); // 设置友盟渠道

Jenkins 使用 Talk-Android-Release 任务来打发布包

开发调试相关设置

由于应用开启了 MultiDex,所以在 build.gradle 文件中配置了2个 productFlavor: dev 和 prod。其中 dev 的 minSdkVersion 为 21,在编译时 Android gradle plugin 会执行 pre-dexing 操作并跳过 dex 合并这一步,编译的效率相对更高。所以在开发时需要在 Android Studio 的 Build Variants 窗口选择devDebug 或 devBeta,但是只能在 5.0版本以上的机器上测试。如需在低版本上测试则需要选择 prodDebug。

talk-android's People

Contributors

sailxjx avatar wlanjie avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.