Creator

Clone URL of Demo

Creator Project:

git clone http://dnsdk.vimedia.cn:8080/r/CreatorDemo.git

Import Creator Plugin

Copy the 'assets/Wb' folder from CreatorDemo into your project to complete import.

The main interfaces include 'ADManger' , 'CoreManger', 'TjManger', 'ToolManger' etc.

Use interface

Import 'Define.ts' and then use interface:

import {Wb} from "../../Wb/Scripts/Define";

Wb.ADManager.Instance.openAd("home_mfzs");

Reference bellow:

1. Core Ability

1、 Open exit game(must)

2、Get parameters of Application

2. Advertising Ability

1、Open the general AD(interstitial/reward video/banner/splash)

2、Open the native AD(interstitial/reward video/banner/splash)

3、IS AD Ready

4、Close AD

5、Get video limit open number

6、Is AD be opened in level

7、Is AD type exist

8、Get AD position param

3. Analysis Ability

1、Custom statistics

2、Checkpoint statistics

3、Recharge statistics

4、Page statistics

Android

1:Add maven repositories

2:Add in project gradle.properties

3:Implementation modules

4:Add proguard config

If the release version does not enable minify, you can skip

5.Add Creator module in build.gradle

6.Modify Application.java

Add code in the corresponding life cycle in MyApplication class:

Or

Made your MyApplication class inherit DNApplication:

7.Modify AndroidManifest.xml

Add related parameter configuration, And use VigameStartActivity as launch item.

8.Made the main Acitivy inherit CreatorWbActivity Or Made the CreatorWbActivity as main Activity

CreatorWbActivity has inherited Cocos2dxActivity

9.Put in the configuration file and modify

Copy VigameConfig.xml to assets dictionary.

And You can configurate ConfigVigame.xml in assets. Property description is as follows:

Name

description

necessary

GameOpenActivity

the path of your main Activity

yes

ScreenOrientation

the orientation of screen

no

SupportAdPositions

the adPositionName of supports

no

WithSplashAD

Support splash ad

no

IsSDK

'true' always and don't modify

yes

CompanyIndex

the index of company,default 1

10.Configuration items of test

1).Open app/build.gradle,modify package/channel/umeng appkey.

Recommendation the package name as follows for Advertising display

2).Modify the background of Splash AD.

If needs,repalace "bg_splash_vigame.png" file in res/drawable.

最后更新于

这有帮助吗?