如何在 android 程序中加入 admob 广告赚钱
2010-03-01 05:14:00 来源:WEB开发网Only the INTERNET permission is required. Setting ACCESS_COARSE_LOCATION (and/or ACCESS_FINE_LOCATION) allows narrowly geo-targeted ads be shown.
这里需要注意的是,<meta-data android:value="YOUR_ID_HERE" android:name="ADMOB_PUBLISHER_ID" />中,我们只需要改的是"YOUR_ID_HERE"。这里需要你填上的ID就是我们之前在Admob网站我们的应用程序管理页面上看到的 Publisher ID,而name="ADMOB_PUBLISHER_ID"是不应该改的。程序需要这个Key来查找对应的Value。
attrs.xml
The attrs.xml file specifies custom AdView attributes in XML
layout files. If your application does not already have an /res/values/attrs.xml
file then create one and copy-and-paste the following into it. If you do have
that file then just add the declare-styleable element:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable
name="com.admob.android.ads.AdView">
<attr
name="testing" format="boolean" />
<attr
name="backgroundColor" format="color" />
<attr
name="textColor" format="color" />
<attr
name="keywords" format="string" />
<attr
更多精彩
赞助商链接