Skip to content

Instantly share code, notes, and snippets.

@mjonesjr90
Last active September 13, 2018 19:49
Show Gist options
  • Save mjonesjr90/468494f40993a77c26bec54979cae759 to your computer and use it in GitHub Desktop.
Save mjonesjr90/468494f40993a77c26bec54979cae759 to your computer and use it in GitHub Desktop.
import com.millennialmedia.MMException;
import com.millennialmedia.MMSDK;
import com.millennialmedia.AppInfo;
...
private static final String SITE_ID = "[YOUR_SITE_ID]";
...
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
//Initialize the Millennial SDK
try{
MMSDK.initialize(this);
//Set Site ID
AppInfo appInfo = new AppInfo();
appInfo.setSiteId(SITE_ID);
MMSDK.setAppInfo(appInfo);
} catch (MMException e){
Log.e(TAG, "SDK didn't initialize", e);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment