2018-12-20

DGLibrary 是DreamGame Technology 公司游戏产品的SDK,供平台商对接我司游戏使用

该SDK包含DG所有游戏大厅和游戏种类

对接方式

1. 引入DG SDK

(1) 手动导入:
导入示例项目中的 app-release.arr文件

(2) 自动构建:
在根目录中的build.gradle添加如下代码

allprojects {   
    repositories {
       google()
       jcenter()
       maven{
           url "https://dl.bintray.com/rain751811032/DGLibrary/"
       }
    }  
}

在app的build.gradle中添加

compile 'com.ca.dg:dglibrary:0.0.1'

2. 添加相应依赖

为避免添加依赖库的冲突,所以提出来一些常用的公共库,在外部app中添加依赖,需要在app的build.gradle中添加如下依赖

    compile 'com.android.support:appcompat-v7:25.2.0'
    compile 'com.android.support:recyclerview-v7:25.2.0'
    compile 'com.android.support:support-v4:25.2.0'
    compile 'com.android.support:support-annotations:25.2.0'

3. 添加权限

    
    
    
    
    
    
    
    
    
    

3. 自定义Application对象并继承App类

继承

com.ca.dg.App

4. 传入token并跳转进去DG 厅

Intent intent = new Intent(MainActivityWaike.this, LoadingActivity.class);
intent.putExtra("token", token);
startActivity(intent);

你可能感兴趣的:(2018-12-20)