android 植入点乐广告方法

网址:http://www.dianjoy.com/dev/register.php?ref_email=348293362%40qq.com

方法:

步骤一:将youmiad-android.jar 导入您的工程中。
1 右键您的工程根目录,选择“Properties”
2 在左面板中选择“Java Build Path”
3 然后选择“Libraries”标签
4 点击“Add External JARs…”
5 选择youmiad-android.jar 的目录路径
6 点击“OK”即导入成功
================================================================================================
步骤二:在manifest.xml文件中配置
<activity android:name="com.dianjoy.DianjoyOfferActivity"
 android:configChanges="keyboardHidden|orientation"/>
 <service android:name="com.dianjoy.DianjoyOfferHelpService" />
================================================================================================
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_LOGS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
第三步:初始化
Dianjoy.initDianjoyContext(this, "0661a2defdb977e87684898a68987de7");
第四步:添加积分墙
Dianjoy.showOffers();
重要的是:在layout.xml文件中加入一个dianle布局

posted on 2012-04-14 10:12  forrest001  阅读(491)  评论(0编辑  收藏  举报

导航