「Android Mopub Getting Started」修訂間的差異

出自TAMedia
跳至導覽 跳至搜尋
imported>Wikiuser
(新頁面: 請依照下列步驟設置專案<br><br> <big><u>Step 1: Download TAMedia & Mopub SDK</u></big><br> :a. 請參照 [https://github.com/mopub/mopub-android-sdk/wiki/Getting-Started Mopu...)
 
imported>Wikiuser
行 38: 行 38:
   <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>
   <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>


<br>
<br><br>
[[Android Integeration with Mopub Mediation|回MoPub教學]]<br>

於 2017年7月10日 (一) 08:57 的修訂

請依照下列步驟設置專案

Step 1: Download TAMedia & Mopub SDK

a. 請參照 Mopub Github 所提供的方式,將Mopub SDK加到您的專案中。
b. Download TAMedia SDK

Step 2: 在AndroidManifest.xml加入所需的權限與Activity

 <!-- Mopub & TAMedia Permission -->
 <uses-permission android:name="android.permission.INTERNET" />
 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
 <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <!-- optional -->
 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <!-- optional -->
<!-- TAMedia Permission --> <uses-permission android:name="android.permission.READ_PHONE_STATE" /> <!-- SDK4.0以上版本請移除 --> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.VIBRATE" /> <!-- optional --> <uses-permission android:name="android.permission.CAMERA"/> <!-- optional, SDK4.0上請加入, 以獲得更豐富的廣告內容 --> <uses-permission android:name="android.permission.RECORD_AUDIO"/> <!-- optional, SDK4.0上請加入, 以獲得更豐富的廣告內容 -->
<!-- Mopub Permission --> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
 <!-- TAMedia Activities -->
 <activity
 	android:name="com.taiwanmobile.pt.adp.view.TWMAdActivity"
 	android:configChanges="orientation|keyboardHidden|navigation|keyboard|screenLayout|uiMode|screenSize|smallestScreenSize"
 	android:hardwareAccelerated="true"
 	android:theme="@android:style/Theme.Translucent" >
 </activity>
 
 <!-- Mopub activity -->
 <activity android:name="com.mopub.mobileads.MoPubActivity" android:configChanges="keyboardHidden|orientation|screenSize"/>
 <activity android:name="com.mopub.mobileads.MraidActivity" android:configChanges="keyboardHidden|orientation|screenSize"/>
 <activity android:name="com.mopub.common.MoPubBrowser" android:configChanges="keyboardHidden|orientation|screenSize"/>
 <activity android:name="com.mopub.mobileads.RewardedMraidActivity" android:configChanges="keyboardHidden|orientation|screenSize" />
 <activity android:name="com.mopub.mobileads.MraidVideoPlayerActivity" android:configChanges="keyboardHidden|orientation|screenSize"/>
 <activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
 <!-- meta-data  -->
 <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>



回MoPub教學