

<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>admob &#8211; Max的程式語言筆記</title>
	<atom:link href="https://stackoverflow.max-everyday.com/tag/admob/feed/" rel="self" type="application/rss+xml" />
	<link>https://stackoverflow.max-everyday.com</link>
	<description>我要當一個豬頭，快樂過每一天</description>
	<lastBuildDate>Thu, 21 Dec 2023 05:47:44 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>

<image>
	<url>https://stackoverflow.max-everyday.com/wp-content/uploads/2017/02/max-stackoverflow-256.png</url>
	<title>admob &#8211; Max的程式語言筆記</title>
	<link>https://stackoverflow.max-everyday.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Google Play 的 Data Safety（資料安全性）表單如何填，如果使用Google Admob</title>
		<link>https://stackoverflow.max-everyday.com/2022/11/google-play-data-safety-admob/</link>
					<comments>https://stackoverflow.max-everyday.com/2022/11/google-play-data-safety-admob/#respond</comments>
		
		<dc:creator><![CDATA[max-stackoverflow]]></dc:creator>
		<pubDate>Mon, 14 Nov 2022 19:20:30 +0000</pubDate>
				<category><![CDATA[Android筆記]]></category>
		<category><![CDATA[admob]]></category>
		<category><![CDATA[Android]]></category>
		<guid isPermaLink="false">https://stackoverflow.max-everyday.com/?p=4160</guid>

					<description><![CDATA[我一開始填沒有收到，結果被退件了，呵呵，因為有使...]]></description>
										<content:encoded><![CDATA[
<p>我一開始填沒有收到，結果被退件了，呵呵，因為有使用到 Google Admob.</p>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="980" height="624" src="https://stackoverflow.max-everyday.com/wp-content/uploads/2022/11/Screen-Shot-2022-11-15-at-3.00.28-AM.png" alt="" class="wp-image-4161" srcset="https://stackoverflow.max-everyday.com/wp-content/uploads/2022/11/Screen-Shot-2022-11-15-at-3.00.28-AM.png?v=1668452475 980w, https://stackoverflow.max-everyday.com/wp-content/uploads/2022/11/Screen-Shot-2022-11-15-at-3.00.28-AM-600x382.png?v=1668452475 600w, https://stackoverflow.max-everyday.com/wp-content/uploads/2022/11/Screen-Shot-2022-11-15-at-3.00.28-AM-768x489.png?v=1668452475 768w" sizes="(max-width: 980px) 100vw, 980px" /></figure>



<p>英文版的Email: Action Required: Your app is not compliant with Google Play Policies</p>



<figure class="wp-block-image size-full"><img decoding="async" width="787" height="707" src="https://stackoverflow.max-everyday.com/wp-content/uploads/2023/12/chrome_2023-12-21_11-34_6n.png?v=1703129695" alt="" class="wp-image-5213" srcset="https://stackoverflow.max-everyday.com/wp-content/uploads/2023/12/chrome_2023-12-21_11-34_6n.png?v=1703129695 787w, https://stackoverflow.max-everyday.com/wp-content/uploads/2023/12/chrome_2023-12-21_11-34_6n-600x539.png?v=1703129695 600w, https://stackoverflow.max-everyday.com/wp-content/uploads/2023/12/chrome_2023-12-21_11-34_6n-768x690.png?v=1703129695 768w" sizes="(max-width: 787px) 100vw, 787px" /></figure>



<p></p>



<p></p>



<p>解法：<br><a href="https://stackoverflow.com/questions/70644513/how-to-fill-data-safety">https://stackoverflow.com/questions/70644513/how-to-fill-data-safety</a></p>



<p>Does your app collect or share any of the required user data types? Yes<br>Is all of the user data collected by your app encrypted in transit? Yes<br>Do you provide a way for users to request that their data is deleted? No</p>



<p>Location &gt; Approximate location（概略位置）<br>App activity &gt; Page views and taps in app<br>App info and performance &gt; Crash logs, Diagnostics（當機記錄、診斷資料）<br>Device or other identifiers &gt; Device or other identifiers（裝置 ID 或其他 ID）</p>



<p>Is this data collected, shared, or both? Both<br>收集：這項資料會從使用者的裝置傳出，由您 (開發人員) 或第三方接收，包括暫時處理的資料及儲存較長時間的資料。<br>分享：這項資料會轉移給使用者裝置或其他裝置上的第三方。</p>



<p>Is this data processed ephemerally? No<br>否，這項收集資料不是採暫時性方式處理</p>



<p><br>Is this data required for your app, or can users choose whether it’s collected? Data collection is required (users can’t turn off this data collection)<br>需要收集資料 (使用者無法關閉資料收集功能)</p>



<p>Why is this user data shared? Advertising or marketing<br>廣告或行銷<br>用於顯示或指定廣告/行銷通信內容，或衡量廣告成效。例如在應用程式中顯示廣告、傳送推播通知來宣傳其他產品或服務，或與廣告合作夥伴分享資料。 </p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p>Prepare for Google Play&#8217;s data disclosure requirements<br><a href="https://developers.google.com/admob/android/play-data-disclosure">https://developers.google.com/admob/android/play-data-disclosure</a></p>



<h2 class="wp-block-heading" id="data_collected_and_shared_automatically">Data collected and shared automatically</h2>



<p>The Google Mobile Ads SDK collects and shares the following data types&nbsp;<em>automatically</em>&nbsp;for advertising, analytics, and fraud prevention purposes.</p>



<figure class="wp-block-table"><table><tbody><tr><th>Data</th><th>By default, the Google Mobile Ads SDK&#8230;</th></tr><tr><td>IP address</td><td>Collects device&#8217;s IP address, which may be used to estimate the general location of a device.</td></tr><tr><td>User product interactions</td><td>Collects user product interactions and interaction information, including app launch, taps, and video views.</td></tr><tr><td>Diagnostic information</td><td>Collects information related to the performance of your app and the SDK, including crash logs, app launch time, hang rate, and energy usage.</td></tr><tr><td>Device and Account identifiers</td><td>Collects&nbsp;<a href="https://support.google.com/googleplay/android-developer/answer/6048248">Android advertising (ad) ID</a>,&nbsp;<a href="https://developer.android.com/training/articles/app-set-id">app set ID</a>, and, if applicable, other identifiers related to signed-in accounts on the device.</td></tr></tbody></table></figure>



<p>All of the user data collected by Google Mobile Ads SDK is encrypted in transit using the Transport Layer Security (TLS) protocol.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p>一個一個項目點, 超花時間, 請使用右上角提供的 export csv / import csv 功能:</p>



<figure class="wp-block-image size-full"><img decoding="async" width="419" height="191" src="https://stackoverflow.max-everyday.com/wp-content/uploads/2023/12/chrome_2023-12-21_12-05_6o.png?v=1703131572" alt="" class="wp-image-5214"/></figure>
]]></content:encoded>
					
					<wfw:commentRss>https://stackoverflow.max-everyday.com/2022/11/google-play-data-safety-admob/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>App 違反不當廣告政策</title>
		<link>https://stackoverflow.max-everyday.com/2018/06/max_ad_content_rating/</link>
					<comments>https://stackoverflow.max-everyday.com/2018/06/max_ad_content_rating/#respond</comments>
		
		<dc:creator><![CDATA[max-stackoverflow]]></dc:creator>
		<pubDate>Tue, 05 Jun 2018 15:36:56 +0000</pubDate>
				<category><![CDATA[Android筆記]]></category>
		<category><![CDATA[iOS筆記]]></category>
		<category><![CDATA[admob]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[iOS]]></category>
		<guid isPermaLink="false">http://stackoverflow.max-everyday.com/?p=2408</guid>

					<description><![CDATA[上架App 被退，原因是： 問題：違反不當廣告政...]]></description>
										<content:encoded><![CDATA[<p>上架App 被退，原因是：</p>
<blockquote><p><b>問題：違反不當廣告政策</b></p>
<p>您的應用程式內顯示的廣告除了必須符合我們的政策規定，<wbr />還必須針對目標對象提供適當內容。舉例來說，<wbr />如果應用程式的內容分級適用對象為未成年人，<wbr />則不可放送含有兒童不宜內容或服務的廣告。</p></blockquote>
<hr />
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2409" src="https://stackoverflow.max-everyday.com/wp-content/uploads/2018/06/Screenshot-2018-06-05-23.03.19.jpg" alt="" width="1024" height="406" srcset="https://stackoverflow.max-everyday.com/wp-content/uploads/2018/06/Screenshot-2018-06-05-23.03.19.jpg 1024w, https://stackoverflow.max-everyday.com/wp-content/uploads/2018/06/Screenshot-2018-06-05-23.03.19-600x238.jpg 600w, https://stackoverflow.max-everyday.com/wp-content/uploads/2018/06/Screenshot-2018-06-05-23.03.19-768x305.jpg 768w" sizes="(max-width: 1024px) 100vw, 1024px" /></p>
<hr />
<p>解法：</p>
<p><a href="https://support.google.com/admob/answer/7562142?hl=zh-Hant&amp;ref_topic=7384665">https://support.google.com/admob/answer/7562142?hl=zh-Hant&amp;ref_topic=7384665</a></p>
<h2>數位內容標籤</h2>
<p>AdMob 會使用數位內容標籤，就廣告對不同目標對象的適合程度進行分級。這類標籤類似於其他機構組織為電影或電玩遊戲所設定的內容分級。</p>
<p>數位內容標籤依定義分為下列幾種：</p>
<ul class="spaced-list">
<li><strong>G</strong>：內容適合一般觀眾 (包括闔家皆宜的內容)</li>
<li><strong>PG</strong>：內容適合大多數的觀眾 (需有家長監護)</li>
<li><strong>T</strong>：內容適合青少年及較年長的觀眾</li>
<li><strong>MA</strong>：內容只適合成年觀眾</li>
</ul>
<p>Google Play 和 Apple App Store 各有專屬的分級和標籤套用方式，用以判定內容對不同年齡層的適合程度。請參閱下表，瞭解您應用程式目標對象所對應的數位內容標籤。</p>
<table class="borders spaced-table">
<thead>
<tr>
<th>數位內容標籤</th>
<th>Google Play (Android)</th>
<th>App Store (iOS)</th>
</tr>
</thead>
<tbody>
<tr>
<td class="align-center">G</td>
<td class="align-center">3+</td>
<td class="align-center">4+</td>
</tr>
<tr>
<td class="align-center">PG</td>
<td class="align-center">7+</td>
<td class="align-center">9+</td>
</tr>
<tr>
<td class="align-center">T</td>
<td class="align-center">12+</td>
<td class="align-center">12+</td>
</tr>
<tr>
<td class="align-center">MA</td>
<td class="align-center">16+、18+</td>
<td class="align-center">17+</td>
</tr>
</tbody>
</table>
<hr />
<p>程式：<br />
provide targeting information to an ad request.</p>
<p><a href="https://developers.google.com/admob/android/targeting#child-directed_setting">https://developers.google.com/admob/android/targeting#child-directed_setting</a></p>
<blockquote>
<pre class="prettyprint"><span class="typ">Bundle</span><span class="pln"> extras </span><span class="pun">=</span> <span class="kwd">new</span> <span class="typ">Bundle</span><span class="pun">();</span><span class="pln">
extras</span><span class="pun">.</span><span class="pln">putString</span><span class="pun">(</span><span class="str">"max_ad_content_rating"</span><span class="pun">,</span> <span class="str">"MA"</span><span class="pun">);</span>

<span class="typ">AdRequest</span><span class="pln"> request </span><span class="pun">=</span> <span class="kwd">new</span> <span class="typ">AdRequest</span><span class="pun">.</span><span class="typ">Builder</span><span class="pun">()</span><span class="pln">
        </span><span class="pun">.</span><span class="pln">addNetworkExtrasBundle</span><span class="pun">(</span><span class="typ">AdMobAdapter</span><span class="pun">.</span><span class="kwd">class</span><span class="pun">,</span><span class="pln"> extras</span><span class="pun">)</span><span class="pln">
        </span><span class="pun">.</span><span class="pln">build</span><span class="pun">();</span></pre>
<p>&nbsp;</p></blockquote>
<hr />
<p>完整範例：<br />
<a href="https://github.com/googleads/googleads-mobile-android-examples/blob/master/java/advanced/APIDemo/app/src/main/java/com/google/android/gms/example/apidemo/AdMobAdTargetingFragment.java">https://github.com/googleads/googleads-mobile-android-examples/blob/master/java/advanced/APIDemo/app/src/main/java/com/google/android/gms/example/apidemo/AdMobAdTargetingFragment.java</a></p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stackoverflow.max-everyday.com/2018/06/max_ad_content_rating/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Error:The number of method references in a .dex file cannot exceed 64K.</title>
		<link>https://stackoverflow.max-everyday.com/2016/07/errorthe-number-of-method-references-in-a-dex-file-cannot-exceed-64k/</link>
					<comments>https://stackoverflow.max-everyday.com/2016/07/errorthe-number-of-method-references-in-a-dex-file-cannot-exceed-64k/#respond</comments>
		
		<dc:creator><![CDATA[max-stackoverflow]]></dc:creator>
		<pubDate>Wed, 06 Jul 2016 16:43:45 +0000</pubDate>
				<category><![CDATA[Android筆記]]></category>
		<category><![CDATA[admob]]></category>
		<category><![CDATA[Android]]></category>
		<guid isPermaLink="false">http://stackoverflow.max-everyday.com/?p=50</guid>

					<description><![CDATA[收到一封google admob 寄來的信： 說...]]></description>
										<content:encoded><![CDATA[<p>收到一封google admob 寄來的信：</p>
<p><a href="http://max-everyday.com/wp-content/uploads/2016/07/Screenshot-2016-07-06-03.46.15.jpg"><img loading="lazy" decoding="async" class="alignnone size-large wp-image-946" src="http://max-everyday.com/wp-content/uploads/2016/07/Screenshot-2016-07-06-03.46.15-1024x1024.jpg" alt="Screenshot 2016-07-06 03.46.15" width="740" height="740" /></a></p>
<p>說要增加下面的code, 廣告在過了 2016-09-15 才會繼續放送:</p>
<p>apply plugin: &#8216;com.android.application&#8217;<br />
&#8230;<br />
dependencies {<br />
<strong>    compile &#8216;com.google.android.gms:play-<wbr />services:9.0.2&#8242;</strong><br />
}</p>
<hr />
<p>在加了上面的 code 進 gradle script 裡，發生了很多奇怪的錯誤。所以想說升級 gradle 到新的版本，原本是使用Android Stuiod 1.5 升級到  2.1.2.</p>
<p>gradle-wrapper.properties 也從原本的 gradle-2.2.1-all.zip 升到 gradle-2.10-all.zip.</p>
<p>之前的 gradle script:</p>
<blockquote><p>dependencies {<br />
classpath &#8216;com.android.tools.build:gradle:1.3.0&#8217;<br />
}</p></blockquote>
<p>升級到：</p>
<blockquote><p>dependencies {<br />
classpath &#8216;com.android.tools.build:gradle:2.1.2&#8217;<br />
}</p></blockquote>
<p>為什麼要升級 gradle? 我也不知道，我發現別人的sample code 都升了，也跟著用新版本好了。</p>
<p><a href="http://max-everyday.com/wp-content/uploads/2016/07/Screenshot-2016-07-06-03.45.27.jpg"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-947" src="http://max-everyday.com/wp-content/uploads/2016/07/Screenshot-2016-07-06-03.45.27.jpg" alt="Screenshot 2016-07-06 03.45.27" width="802" height="604" /></a></p>
<p>接著在console 裡有看到一些 warning 像是：</p>
<p>Some input files use or override a deprecated API.</p>
<p>一開始沒仔細看，以為紅字都是Error 為了解這個Warning 花了很多時間，後來發現是 Warning 就略過。</p>
<p>接著Build 失敗的問題是：</p>
<blockquote><p>Error: The number of method references in a .dex file cannot exceed 64K.</p></blockquote>
<p>為了解這個問題，花了一些時間，讀了些不錯的文章：</p>
<p>Configure Apps with Over 64K Methods<br />
<a href="https://developer.android.com/studio/build/multidex.html">https://developer.android.com/studio/build/multidex.html</a></p>
<p>[Android Code] DEX with Over 65K Methods problem and how to use MultiDex on Android<br />
<a href="http://www.akexorcist.com/2016/02/dex-with-over-65k-and-multidex-on-android-en.html">http://www.akexorcist.com/2016/02/dex-with-over-65k-and-multidex-on-android-en.html</a></p>
<p>這篇真的寫的滿好的，圖文並茂，淺顯易懂，透過這篇也發現，Google 寄來的email 裡的 sample code 會造成 DEX with Over 65K Methods  的 error.</p>
<p>解法：</p>
<blockquote><p>compile &#8216;com.google.android.gms:play-services<span style="color: #ff0000;"><strong>-ads</strong></span>:9.2.0&#8242;</p></blockquote>
<p>說明：真的不用import 整個 play services 那太胖了！</p>
<hr />
<p>又解掉一個Build Error, 下一個Build Error 是：</p>
<blockquote><p>&#8220;app_name&#8221; is not translated in &#8220;af&#8221; (Afrikaans), &#8220;am&#8221; (Amharic), &#8220;ar&#8221; (Arabic), &#8220;bg&#8221; (Bulgarian), &#8220;ca&#8221; (Catalan), &#8220;cs&#8221; (Czech), &#8220;da&#8221; (Danish), &#8220;de&#8221; (German), &#8220;el&#8221; (Greek), &#8220;en-rGB&#8221; (English: United Kingdom), &#8220;en-rIN&#8221; (English: India), &#8220;es&#8221; (Spanish), &#8220;es-rUS&#8221; (Spanish: United States), &#8220;et-rEE&#8221; (Estonian: Estonia), &#8220;fa&#8221; (Persian), &#8220;fi&#8221; (Finnish), &#8220;fr&#8221; (French), &#8220;fr-rCA&#8221; (French: Canada), &#8220;hi&#8221; (Hindi), &#8220;hr&#8221; (Croatian), &#8220;hu&#8221; (Hungarian), &#8220;hy-rAM&#8221; (Armenian: Armenia), &#8220;in&#8221; (Indonesian), &#8220;it&#8221; (Italian), &#8220;iw&#8221; (Hebrew), &#8220;ja&#8221; (Japanese), &#8220;ka-rGE&#8221; (Georgian: Georgia), &#8220;km-rKH&#8221; (Khmer: Cambodia), &#8220;ko&#8221; (Korean), &#8220;lo-rLA&#8221; (Lao: Lao People&#8217;s Democratic Republic), &#8220;lt&#8221; (Lithuanian), &#8220;lv&#8221; (Latvian), &#8220;mn-rMN&#8221; (Mongolian: Mongolia), &#8220;ms-rMY&#8221; (Malay: Malaysia), &#8220;nb&#8221; (Norwegian Bokmål), &#8220;nl&#8221; (Dutch), &#8220;pl&#8221; (Polish), &#8220;pt&#8221; (Portuguese), &#8220;pt-rPT&#8221; (Portuguese: Portugal), &#8220;ro&#8221; (Romanian), &#8220;ru&#8221; (Russian), &#8220;sk&#8221; (Slovak), &#8220;sl&#8221; (Slovene), &#8220;sr&#8221; (Serbian), &#8220;sv&#8221; (Swedish), &#8220;sw&#8221; (Swahili), &#8220;th&#8221; (Thai), &#8220;tl&#8221; (Tagalog), &#8220;tr&#8221; (Turkish), &#8220;uk&#8221; (Ukrainian), &#8220;vi&#8221; (Vietnamese), &#8220;zh-rCN&#8221; (Chinese: China), &#8220;zh-rHK&#8221; (Chinese: Hong Kong), &#8220;zh-rTW&#8221; (Chinese: Taiwan, Province of China), &#8220;zu&#8221; (Zulu)</p></blockquote>
<p>之前使用 Android Stdio 1.5，可以直接Build，升級到 Android Studio 2.1.2，會跑出必需有完整對應的翻譯檔。解法是在strings.xml 裡增加 tools:ignore=&#8221;MissingTranslation&#8221; .</p>
<p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&gt;<br />
&lt;resources<br />
xmlns:tools=&#8221;http://schemas.android.com/tools&#8221;<br />
<span style="color: #ff0000;"><strong>tools:ignore=&#8221;MissingTranslation&#8221;</strong></span>&gt;<br />
&lt;string name=&#8221;app_name&#8221;&gt;your app name&lt;/string&gt;<br />
&lt;/resources&gt;</p>
<p>更多其他解法：</p>
<p>Android APP打包时，出错:&#8221;XXX&#8221; is not translated in &#8220;af&#8221; (Afrikaans), &#8220;am&#8221; (Amharic), &#8220;ar&#8221; (Arabic)&#8230;<br />
http://blog.csdn.net/buaaroid/article/details/49469213</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stackoverflow.max-everyday.com/2016/07/errorthe-number-of-method-references-in-a-dex-file-cannot-exceed-64k/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
