-
Notifications
You must be signed in to change notification settings - Fork 4
Initializing SDK
CMAdSDK edited this page May 31, 2016
·
15 revisions
Before you integrate advertisement,Please initialize PEGASI SDK. At the same time ,we strongly recommended that initialization in the onCreate method of Application. 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: Mid(the identifier of the app,the first four numbers of posid)
//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();
}
}update your application name,for example:
<application
android:allowBackup="true"
android:name="com.cmcm.ads.MyApplication" //update your application name
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity android:name=".MainActivity">
...
...
</application>