灵聚智能助理

     

     

配置环境及发布

开发环境

1. 创建签名文件

打开cmd,输入以下指令:

keytool -genkey -v -keystore {FILENAME.keystore} -alias {ALIAS} -keyalg RSA -validity {DURATION} 

* {FILENAME.keystore} 为生成的KeyStore的文件名
* {ALIAS} 为生成的KeyStore文件的别名
* {DURATION} 为该KeyStore文件的过期时间

2. 修改app/build.gradle里android.signingConfigs.default_config

android {
    signingConfigs {
        default_config {
            keyAlias '你的keyAlias'
            keyPassword '你的keyPassword'
            storeFile file('你的keystore文件路径')
            storePassword '你的storePassword'
        }
    }
    ...
}

3. 申请第三方SDK的appkey

需要申请appkey的SDK如下:

   
第三方SDK appkey申请地址
灵聚SDK(软件版) http://dev.lingju.ai/
讯飞语音 http://www.xfyun.cn/index.php/mycloud/app/create
百度LBS http://lbsyun.baidu.com/apiconsole/key/create
新浪微博 http://open.weibo.com/apps/new?sort=mobile
腾讯QQ http://open.qq.com/
微信 https://open.weixin.qq.com/
喜马拉雅(听书) http://open.ximalaya.com/

4. 在项目中替换新申请到的appkey

在app下的com.lingju.assistant.social.weibo.Constants类中修改对应常量参数的值。

    /** 微博appkey */
    String WEIBO_APPKEY = "你的appkey";

    /** 微信 */
    String WECHAT_APPID = "你的appid";
    String WECHAT_AppSecret = "你的appSecret";

    /** 腾讯qq*/
    String TENCENT_APPID = "你的appid";
    String TENCENT_AppSecret = "你的appSecret";

    /**讯飞语音*/
    String XUNFEI_APPID = "你的appid";

    /**喜马拉雅*/
    String XIMALAYA_APPKEY = "你的appkey";
    String XIMALAYA_APPSECRET = "你的appSecret";
    // 授权回调页,默认使用该URL(在开发平台创建应用时也要填入该URL)
    String XIMALAYA_REDIRECT_URL = "https://api.ximalaya.com/openapi-collector-app/get_access_token";

    /** 灵聚SDK*/
    String LINGJU_APPKEY = "你的appkey";
<!-- 百度LBS -->
<meta-data
    android:name="com.baidu.lbsapi.API_KEY"
    android:value="你的appkey"/>
<!--喜马拉雅SDK-->
<meta-data
    android:name="app_key"
    android:value="你的appkey"/>

5. 在项目中替换对应的SDK

相关文档链接

  1. APP开源说明文档(必读)
  2. 灵聚SDK指令文档

License Hex.pm

Copyright(c) 2017 灵聚科技

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.