Difference between revisions of "Android Video"

From AdLocus
Jump to: navigation, search
Line 5: Line 5:
 
* JAR檔與 AndroidManifest.xml 是否已[[Android_AddSDK|設定]]完成
 
* JAR檔與 AndroidManifest.xml 是否已[[Android_AddSDK|設定]]完成
  
−
== 啟用插頁式版位 ==  
+
== 啟用影音版位 ==  
−
在您想啟用插頁式版位的 Activity 中加入下列程式碼
+
在您想啟用影音版位的 Activity 中加入下列程式碼
 
<syntaxhighlight lang="java">
 
<syntaxhighlight lang="java">
 
private InterstitialVideoReq mInterstitialVideoReq;
 
private InterstitialVideoReq mInterstitialVideoReq;

Revision as of 22:25, 2 October 2014

前言

影音版位將以曝光次數高額分潤,是您提高收益的最好單元之一。

自我檢查

  • JAR檔與 AndroidManifest.xml 是否已設定完成

啟用影音版位

在您想啟用影音版位的 Activity 中加入下列程式碼

private InterstitialVideoReq mInterstitialVideoReq;
 
mInterstitialVideoReq = new InterstitialVideoReq(this, KEY, new VideoAdListener() {
    @Override
    public void onStart() {
        //we will start an activity and rotate screen to landscape,
        //make sure your code and your user are ready for a movie show!
        mInterstitialVideoReq.show();
    }
});
 
mInterstitialVideoReq.load();