Initialize SDK - uc-union/union-ads-sdk-demo GitHub Wiki
Union Ad SDK MUST be initialzed correctly, or it may cause error ad request is processed.
Use UnionAdsSdk.start()
in onCreate()
of Application
to activate and initialize Ad SDK.
Example codes are listed below, for a complete example please refer to UnionAdsSdkSampleApp.java
public class MyApplication extends Application {
@Override
public void onCreate() {
...
UnionAdsSdk.start(this, <AppKey>);
}
}
Note:
- If
Application
is not defined by the app, you need to derive one and define it inAndroidManifest.xml
, please refer to AndroidManifest.xml
<AppKey>
is the unique id of your application in uc union system, you can see it in uc union manage console HERE
[Screen Shot]:
-
Follow our guide on Banners to add banner ads in your app.
-
Follow our guide on Interstitial to add interstitial ads in your app.
-
Follow our guide on Native Ads to add native ads in your app.
-
See FAQ to know about the frequently asked questions.
-
See API reference to explore all APIs in Union Ad SDK.