-
Notifications
You must be signed in to change notification settings - Fork 4
Initializing SDK
liuluchao edited this page Jul 28, 2016
·
15 revisions
Please initialize PEGASI SDK before you integrate advertisement, we highly recommend you call the onCreate method in Application class. For example:
/**
* it is strongly recommended that custom Application
* and initialized SDK in application#onCreate()
*/
public class MyApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
//init sdk
//The first parameter:Context
//The second parameter: AppId(the identifier of the app,the first four numbers of ADUnitId)
//The third parameter:product channel id(can be null)
CMAdManager.applicationInit(Context, Your Mid, "");
//if you want to print debug log ,set it
//CMAdManager.enableLog();
/**
* Display Interstitial and Banner ad must set imageLoadListener.
* if you have imageLoadListener which from local project, please set it.
* if not, please see CMAdSDKdemo and reference it.
*/
// CMAdManagerFactory.setImageDownloadListener(new MyImageLoadListener());
}
}