source app ads 怎么sourcetree 删除文件

Android Open Source - snakk-ads-android-sample-app
Ad RequestFrom ProjectBack to project page .LicenseThe source code is released under:
Copyright (c) 2012, Snakk! Media Group
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are m...
Java Source Codepackage com.snakk.
import java.io.UnsupportedEncodingE
import java.net.URLE
import java.util.*;
import android.content.C
import android.util.L
public class AdRequest {
public static final String TAG = "Snakk";
private Map&String, String& parameters = new HashMap&String, String&();
private static final String PARAMETER_ZONE = "zone";
private static final String PARAMETER_ADTYPE = "adtype";
private static final String PARAMETER_USER_AGENT = "ua";
private static final String PARAMETER_LATITUDE = "lat";
private static final String PARAMETER_LONGITUDE = "long";
private static final String PARAMETER_BACKGROUND = "paramBG";
private static final String PARAMETER_LINK = "paramLINK";
private static final String PARAMETER_MIN_SIZE_X = "min_size_x";
private static final String PARAMETER_MIN_SIZE_Y = "min_size_y";
private static final String PARAMETER_SIZE_X = "size_x";
private static final String PARAMETER_SIZE_Y = "size_y";
private static final String PARAMETER_HEIGHT = "h";
private static final String PARAMETER_WIDTH = "w";
private static final String PARAMETER_CONNECTION_SPEED = "connection_speed";
private static final String PARAMETER_LANGUAGES = "languages";
private static final String PARAMETER_CARRIER_NAME = "carrier";
private static final String PARAMETER_CARRIER_ID = "carrier_id";
public final static String PARAMETER_DEVICE_ID = "udid";
private String adserverURL = "/adrequest.php";
private String adserverURL = "/~npenteado/adrequest.php";
private Map&String, String& customParameters = new HashMap&String, String&();
private AdLog adL
public AdRequest(AdLog adLog) {
this.adLog = adL
public AdRequest(String zone) {
setZone(zone);
adLog = new AdLog(this);
public void initDefaultParameters(Context context) {
String deviceIdMD5 = Utils.getDeviceIdMD5(context);
String carrierName = Utils.getCarrierName(context);
String carrierId = Utils.getCarrierId(context);
String ua = Utils.getUserAgentString(context);
adLog.log(AdLog.LOG_LEVEL_2, AdLog.LOG_TYPE_INFO, "deviceIdMD5", deviceIdMD5);
if ((deviceIdMD5 != null) && (deviceIdMD5.length() & 0)) {
parameters.put(PARAMETER_DEVICE_ID, deviceIdMD5);
parameters.put("format", "json");
parameters.put("sdk", "android-v" + AdViewCore.VERSION);
parameters.put(PARAMETER_CARRIER_NAME, carrierName);
parameters.put(PARAMETER_CARRIER_ID, carrierId);
parameters.put(PARAMETER_LANGUAGES, Locale.getDefault().getLanguage());
parameters.put(PARAMETER_USER_AGENT, ua);
* Get URL of ad server.
public synchronized String getAdserverURL() {
return adserverURL;
* Overrides the URL of ad server.
* @param adserverURL
public synchronized void setAdserverURL(String adserverURL) {
if ((adserverURL != null) && (adserverURL.length() & 0)) {
this.adserverURL = adserverURL;
* Optional. Set the browser user agent of the device making the request.
* @param ua
public AdRequest setUa(String ua) {
if (ua != null) {
parameters.put(PARAMETER_USER_AGENT, ua);
return this;
* Required. Set the id of the zone of publisher site.
* @param zone
public final AdRequest setZone(String zone) {
if (zone != null) {
parameters.put(PARAMETER_ZONE, zone);
return this;
* Required. Set the adtype of the advertise.
* @param adtype
public AdRequest setAdtype(String adtype) {
if (adtype != null) {
parameters.put(PARAMETER_ADTYPE, adtype);
return this;
* Optional. Set Latitude.
* @param latitude
public AdRequest setLatitude(String latitude) {
if (latitude != null) {
parameters.put(PARAMETER_LATITUDE, latitude);
return this;
* Optional. Set Longitude.
* @param longitude
public AdRequest setLongitude(String longitude) {
if (longitude != null) {
parameters.put(PARAMETER_LONGITUDE, longitude);
return this;
* Optional. Set Background color in borders.
* @param paramBG
public AdRequest setParamBG(String paramBG) {
if (paramBG != null) {
parameters.put(PARAMETER_BACKGROUND, paramBG);
return this;
* Optional. Set Text color.
* @param paramLINK
public AdRequest setParamLINK(String paramLINK) {
if (paramLINK != null) {
parameters.put(PARAMETER_LINK, paramLINK);
return this;
* @deprecated
* Optional. Set minimum width of advertising.
* @param minSizeX
@Deprecated
public AdRequest setMinSizeX(Integer minSizeX) {
if ((minSizeX != null) && (minSizeX & 0)) {
parameters.put(PARAMETER_MIN_SIZE_X, String.valueOf(minSizeX));
return this;
* @deprecated
* Optional. Set minimum height of advertising.
* @param minSizeY
@Deprecated
public AdRequest setMinSizeY(Integer minSizeY) {
if ((minSizeY != null) && (minSizeY & 0)) {
parameters.put(PARAMETER_MIN_SIZE_Y, String.valueOf(minSizeY));
return this;
* @deprecated
* Optional. Set maximum width of advertising.
* @param sizeX
@Deprecated
public AdRequest setSizeX(Integer sizeX) {
if ((sizeX != null) && (sizeX & 0)) {
parameters.put(PARAMETER_SIZE_X, String.valueOf(sizeX));
return this;
* @deprecated
* Optional. Set maximum height of advertising.
* @param sizeY
@Deprecated
public AdRequest setSizeY(Integer sizeY) {
if ((sizeY != null) && (sizeY & 0)) {
parameters.put(PARAMETER_SIZE_Y, String.valueOf(sizeY));
return this;
public AdRequest setHeight(Integer height) {
if ((height != null) && (height & 0)) {
parameters.put(PARAMETER_HEIGHT, String.valueOf(height));
return this;
public Integer getHeight() {
String height = parameters.get(PARAMETER_HEIGHT);
return getIntParameter(height);
public AdRequest setWidth(Integer width) {
if ((width != null) && (width & 0)) {
parameters.put(PARAMETER_WIDTH, String.valueOf(width));
return this;
public Integer getWidth() {
String width = parameters.get(PARAMETER_WIDTH);
return getIntParameter(width);
* Optional. Set connection speed. 0 - low (gprs, edge), 1 - fast (3g,
* @param connectionSpeed
public AdRequest setConnectionSpeed(Integer connectionSpeed) {
if (connectionSpeed != null) {
parameters.put(PARAMETER_CONNECTION_SPEED, String.valueOf(connectionSpeed));
return this;
public String getAdtype() {
return parameters.get(PARAMETER_ADTYPE);
public String getUa() {
return parameters.get(PARAMETER_USER_AGENT);
public String getZone() {
return parameters.get(PARAMETER_ZONE);
public String getLatitude() {
return parameters.get(PARAMETER_LATITUDE);
public String getLongitude() {
return parameters.get(PARAMETER_LONGITUDE);
public String getParamBG() {
return parameters.get(PARAMETER_BACKGROUND);
public String getParamLINK() {
return parameters.get(PARAMETER_LINK);
* @deprecated
@Deprecated
public Integer getMinSizeX() {
String minSizeX = parameters.get(PARAMETER_MIN_SIZE_X);
return getIntParameter(minSizeX);
* @deprecated
@Deprecated
public Integer getMinSizeY() {
String minSizeY = parameters.get(PARAMETER_MIN_SIZE_Y);
return getIntParameter(minSizeY);
* @deprecated
@Deprecated
public Integer getSizeX() {
String sizeX = parameters.get(PARAMETER_SIZE_X);
return getIntParameter(sizeX);
* @deprecated
@Deprecated
public Integer getSizeY() {
String sizeY = parameters.get(PARAMETER_SIZE_Y);
return getIntParameter(sizeY);
public Integer getConnectionSpeed() {
String connectionSpeed = parameters.get(PARAMETER_CONNECTION_SPEED);
return getIntParameter(connectionSpeed);
* @deprecated use setCustomParameters(Map&String, String& cParams)
* Optional. Set Custom parameters.
* @param cParams
@Deprecated
public void setCustomParameters(Hashtable&String, String& cParams) {
customParameters.putAll(cParams); // this throws a NPE
for (String key : cParams.keySet()) {
customParameters.put(key, cParams.get(key));
* Optional. Set Custom parameters.
* @param cParams a map containing parameters to add.
To clear out existing params, set cParams to null
public void setCustomParameters(Map&String, String& cParams) {
if (cParams != null) {
customParameters.putAll(cParams);
customParameters.clear();
public Map&String, String& getCustomParameters() {
return customP
private static Integer getIntParameter(String stringValue) {
if (stringValue != null) {
return Integer.parseInt(stringValue);
* Creates URL with given parameters.
* @return URL string representing this ad request
* @throws IllegalStateException
if all the required parameters are not present.
public synchronized String createURL() throws IllegalStateException {
return this.toString();
public synchronized String toString() {
StringBuilder builderToString = new StringBuilder();
String adserverURL = this.adserverURL + '?';
builderToString.append(adserverURL);
appendParameters(builderToString, parameters);
appendParameters(builderToString, customParameters);
String url = builderToString.toString();
return // builderToString.toString().equals(adserverURL)
// ? this.adserverURL :
// builderToString.toString();
private static void appendParameters(StringBuilder builderToString, Map&String, String& parameters) {
if (parameters != null) {
Set&String& keySet = parameters.keySet();
for (Map.Entry&String, String& parmEntry : parameters.entrySet()) {
String value = parmEntry.getValue();
if (value != null) {
builderToString.append('&')
.append(URLEncoder.encode(parmEntry.getKey(), "UTF-8"))
.append('=').append(URLEncoder.encode(value, "UTF-8"));
} catch (UnsupportedEncodingException e) {
Log.e(TAG, "An error occurred", e);
Java Source Code List
&|&Email:info &|&& Demo Source and Support. All rights reserved.如何进行App推广以及广告推送
互联网广告计费方式:
计费方式名称
计费方式含义
CPM(Cost Per Mille)
按照显示次数计费;广告显示1000次所应付的费用。
CPC(Cost Per Click)
按照点击次数计费;广告点击1000次所应付的费用
CPA(Cost Per Action)
每行动成本。CPA计价方式是指按广告投放实际效果,即按回应的有效问卷或定单来计费,而不限广告投放量。
CPR(Cost Per Response)
每回应成本。以浏览者的每一个回应计费。
CPP(Cost Per Purchase)
每购买成本。广告主为规避广告费用风险,只有在网络用户点击旗帜广告并进行在线交易后,才按销售笔 数付给广告站点费用。
CPS(Cost Per Sale)
广告以实际销售产品数量来换算广告刊登金额
CPL(Cost Per Leads)
以搜集潜在客户名单多少来收费
Web端广告联盟
搜狗广告联盟
广告联盟(AdSense)
移动端广告联盟
cn.domob.android
com.baidu.mobstat
net.youmi.android
http://www.youmi.net/
com.tencent
http://dev./indexInit.action?_s_t=8
com.wooboo
/mm/Index.ad
com.adchina
/AboutUs/index.aspx
com.vpon.adon
com.energysource.szj
com.adwo.adsdk
com.mt.airad
com.wqmobile
cn.appmedia.ad
/top.action
com.ignitevision.android
/mobile/index.do
com.l.adlib_android
com.winad.android
com.mobisage
http://mobisage./
com.umengAd
com.fractalist
http://www.admarket.mobi/
com.suizong.mobplate
/szmobile/szmWelcomeMgtMgr.action
cn.aduu.adsdk
com.google.ads
/ads/admob/
MillennialMedia
com.millennialmedia.android
Greystripe
com.greystripe.android
com.inmobi.androidsdk
com.mdotm.android
com.zestadz.android
com.smaato.SOMA
App如何推广?
推广上的总体思路有:​
1. 线上推广​​
微博推广、微信推广、分发渠道付费推广、广告联盟推广、静默渠道推广、ROM内置、QQ群/论坛推广/邮件推广、刷榜推广
2. 线下推广​
平面广告推广、手机预装、扫街推广。
&O& 微博推广
n& 微博粉丝通
优点: 微博用户群巨大、号称精准营销
缺点:效率低
价位:CPC 1.0、CPM 8-15
n& 粉丝置顶
特点:价格低廉
缺点:需要本身已经拥有较大的粉丝数量
n& 大V转发
优点:转发量大,且容易形成口碑营销
缺点:太多假大V,真大V价格非常高
n& 公共账号运营
需要不断更新
容易形成品牌号召力
&O& 微信推广
n& 微信公共账号运营
多样化的展示
公司产品介绍
机器人问答设置
n& 如何运营公共账号
游戏或软文推广
&O& 分发渠道付费推广
常见分发渠道以及排名
百度家族(百度手机助手、安卓市场、91助手)
360手机助手
华为软件商城
分发渠道推广特点
1、效果明显,能短期带来大量安装
2、价格昂贵,平均每个用户获取成本为10元
&O& 广告联盟
百度竞价推广
通过竞价达到排名的优先目的,是电视购物的主战场
竞价费用较高,多为巨头垄断
ADMOB、多盟、艾德思齐、百度、安沃等
APP推广常见渠道,以CPC/CPM为主要广告形式
获取用户成本较高
网站广告联盟
常见如DISCUZ/PHPWIND广告联盟
高流量网站联盟
常见的APP广告形式
按点击付费
按千次展示付费
按激活数付费,单价2元
百度竞价排名
淘宝直通车
&O& 静默渠道推广
静默渠道特点
后台病毒式营销
& 成本相对较低(0.8-1元)
& 具有强制性
& 较易引起方案
& 除非是必备软件,删除可能性极高
&O& ROM内置
可以与电信、联通、移动等大量渠道进行合作
除非刷机,APP无法删除
成本较为适中
运营商渠道谈判难度较高,需要投入大量资金,普通ROM渠道不稳定,质量参差不齐,谈判维护成本高
&O& QQ群邮件、论坛等推广
QQ群推广。通过群发较多QQ群达到推广目的。每个群0.5元
QQ群邮件群发,每封群邮件0.5元
论坛发帖推广,每个帖子0.5元,如果需要置顶、不断回复,保持不被删除价格另外计算;
门户网站软文推广:根据门户网站的级别不同,有不同的软文报价;
&O& 刷量推广
通过刷下载量占据排名
排名可以引导自然量
各大市场的刷量成本不同,价格不同
刷量如果自己进行较为便宜,但有技术门槛
市场上的刷量价格为50/万
某些市场需要刷到排名靠前,需要大量资金,还有封停危险
二维码推广
公交等移动媒体、楼宇传媒
手机店手机预装
扫街推广(微店)
关于刷榜的那些事
检验刷榜效果可以用,百度指数来衡量效果。
关于刷榜时间选择:时间也很重要,推荐周四刷,周五一定要在前十,这个时候是大量新注册用户进游戏的时候,一直维持到周一,之后会有自然的增长和流失。但是只要产品和支付过硬,营收不会差。如果是周一刷上去,人工维持到周五就停了,那等于白刷,花钱打水漂比这个都强。
已投稿到:
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。Android Open Source - snakk-ads-android-sample-app
T V A S T Ad ErrorFrom ProjectBack to project page .LicenseThe source code is released under:
Copyright (c) 2012, Snakk! Media Group
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are m...
Java Source Codepackage com.snakk.
import android.os.P
import android.os.P
public class TVASTAdError implements Parcelable {
/// Possible error types while loading or playing ads.
protected enum AdErrorType implements Parcelable {
/// This may mean that the SDK wasn't loaded properly.
/// An error occured while loading the ads.
/// An error occured while playing the ads.
public int describeContents() {
public void writeToParcel(final Parcel dest, final int flags) {
dest.writeInt(ordinal());
public static final Creator&AdErrorType& CREATOR = new Creator&AdErrorType&() {
public AdErrorType createFromParcel(final Parcel source) {
return AdErrorType.values()[source.readInt()];
public AdErrorType[] newArray(final int size) {
return new AdErrorType[size];
/// Possible error codes raised while loading or playing ads.
protected enum AdErrorCode implements Parcelable {
/// Unknown error occured while loading or playing the ad.
UNKNOWN_ERROR(0),
/// There was an error playing the video ad.
VIDEO_PLAY_ERROR(1003),
// = 1003,
/// There was a problem requesting ads from the server.
FAILED_TO_REQUEST_ADS(1004),
// = 1004,
/// There was an internal error while loading the ad.
INTERNAL_ERROR(2001),
// = 2001,
/// No supported ad format was found.
SUPPORTED_ADS_NOT_FOUND(2002),
/// Ad Slot not visible
ADSLOT_NOT_VISIBLE(2003),
/// At least one VAST wrapper ad loaded successfully and a subsequent wrapper
/// or inline ad load has timed out.
VAST_LOAD_TIMEOUT(3001),
// = 3001,
/// At least one VAST wrapper loaded and a subsequent wrapper or inline ad
/// load has resulted in a 404 response code.
VAST_INVALID_URL(3002),
// = 3002,
/// The ad response was not recognized as a valid VAST ad.
VAST_MALFORMED_RESPONSE(3003),// = 3003,
/// A media file of a VAST ad failed to load or was interrupted mid-stream.
VAST_MEDIA_ERROR(3004),
// = 3004,
/// The maximum number of VAST wrapper redirects has been reached.
VAST_TOO_MANY_REDIRECTS(3005),// = 3005,
/// Assets were found in the VAST ad response, but none of them matched the
/// video player's capabilities.
VAST_ASSET_MISMATCH(3006),
// = 3006,
/// No assets were found in the VAST ad response.
VAST_ASSET_NOT_FOUND(3007),
// = 3007,
/// Invalid arguments were provided to SDK methods.
INVALID_ARGUMENTS(3101),
// = 3101,
/// A companion ad failed to load or render.
COMPANION_AD_LOADING_FAILED(3102),
// = 3102,
/// The ad response was not understood and cannot be parsed.
UNKNOWN_AD_RESPONSE(3103),
// = 3103,
/// An unexpected error occurred while loading the ad.
UNEXPECTED_LOADING_ERROR(3104),
// use unknown error
/// An overlay ad failed to load.
OVERLAY_AD_LOADING_FAILED(3105),
// = 3105,
/// An overlay ad failed to render.
OVERLAY_AD_PLAYING_FAILED(3106);
// = 3106,
private int
private AdErrorCode(int code) {
this.code =
protected int getCode() {
public int describeContents() {
public void writeToParcel(final Parcel dest, final int flags) {
dest.writeInt(ordinal());
public static final Creator&AdErrorCode& CREATOR = new Creator&AdErrorCode&() {
public AdErrorCode createFromParcel(final Parcel source) {
return AdErrorCode.values()[source.readInt()];
public AdErrorCode[] newArray(final int size) {
return new AdErrorCode[size];
private AdErrorType mErrorT
private AdErrorCode mErrorC
private String mErrorM
public TVASTAdError(AdErrorType type, AdErrorCode code, String message) {
mErrorType =
mErrorCode =
mErrorMessage =
public AdErrorCode getErrorCode() {
return mErrorC
public AdErrorType getErrorType() {
return mErrorT
public String getMessage() {
return mErrorM
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((mErrorMessage == null) ? 0 : mErrorMessage.hashCode());
public boolean equals(Object obj) {
if (this == obj)
if (obj == null)
if (getClass() != obj.getClass())
TVASTAdError other = (TVASTAdError)
if (mErrorMessage == null) {
if (other.mErrorMessage != null)
} else if (!mErrorMessage.equals(other.mErrorMessage))
public static final Creator&TVASTAdError& CREATOR = new Creator&TVASTAdError&() {
public TVASTAdError[] newArray(int size) {
return new TVASTAdError[size];
public TVASTAdError createFromParcel(Parcel source) {
AdErrorType type = source.readParcelable(AdErrorType.class.getClassLoader());
AdErrorCode code = source.readParcelable(AdErrorCode.class.getClassLoader());
String message = source.readString();
TVASTAdError adError = new TVASTAdError(type, code, message);
return adE
public int describeContents() {
public void writeToParcel(Parcel dest, int flags) {
dest.writeParcelable(mErrorType, flags);
dest.writeParcelable(mErrorCode, flags);
dest.writeString(mErrorMessage);
Java Source Code List
&|&Email:info &|&& Demo Source and Support. All rights reserved.清除 ‘Brought to you by SourceApp’ Ads | 删除病毒间谍软件}

我要回帖

更多关于 ads by google删除 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信