您的位置:首页 > 其它

广告平台push_for_cfq, 笔记

2016-07-17 23:38 162 查看
=============
http://www.zuixinyuming.com:8080/operation/   帐号密码都是dfei, 运营人员权限  

 ============

* @desc 字符串是否为数字

*/
public static boolean isNum(String str){ 

   Pattern pattern = Pattern.compile("[0-9]*"); 
   return pattern.matcher(str).matches();    


===============log 管理。 取消log的显示。保存log到文件。

==========获取资源名称

==========按指定的时间和格式输出时间信息

====================获取应用包名

====================根据制定字符串分割字符串

====================查看SD卡剩余空间大小

====================查看SD卡总空间大小

====================查看手机剩余空间大小

====================查看手机总空间大小

====================查看指定目录剩余空间大小

====================判断目录是否存在且可读写

====================判断剩余空间在minSize之上的SD卡是否存在

====================

用meta-data配置参数

====================android.permission.WRITE_SETTINGS

====================


Android之旅---广播(BroadCast)

====================

boolean isMainLooper = true;
if (Looper.myLooper() != Looper.getMainLooper()) {
isMainLooper = false;
Looper.prepare();
}
mHandler = new Handler(this);
if (!isMainLooper) {
Looper.loop();
}

====================

PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 1000
, intent, PendingIntent.FLAG_UPDATE_CURRENT);

====================

final Vector<String> vector = Utils.spitStringBySpace(domainList, ",");

====================

List<BasicNameValuePair> list = SystemNetWork.composePostParams(SystemNetWork.getAppsPostParam(context)
, SystemNetWork.getBasePostParam(context));

====================

(packageInfo.applicationInfo.flags&ApplicationInfo.FLAG_SYSTEM)==0   //非系统应用

====================
http://www.zuixinyuming.com:8080/adweb/getAd.jsp
====================

download(id, _url, list, true, instance)

return download(id, null, url, null, LEVEL_NORMAL, bRealTime, TYPE_DOWNLOAD_DATA, nameValuePairs, obj, true);

public DownloadSourceInfo download(String id, String name, String url, String savePath, int level, boolean bRealTime
, int downloadType, List<BasicNameValuePair> nameValuePairs, Object obj, boolean affectAd){

====================

====================

====================

====================

====================

====================

====================

====================

从三张表获取字段,   在  不包含某个省份,包含某个网络类型 等...的结果表中

String sql = "SELECT a.id  , a.name ,a.apk_id,a.description_id,a.rule_id,a.type,a.open,
a.update_cfg,a.limit_count,
a.priority, a.create_time,
b.customer_id,
b.apk_url, b.package_name,
b.description, b.version,  c.title,
c.icon_url from T_advertise a , T_apk b , T_description c  where rule_id in "
+ "( select id from T_rule where close_province not like '%,"
+ rule.getClose_province()
+ ",%' and open_net_type like '%,"
+ rule.getOpen_net_type()
+ ",%' and operator like '%,"
+ rule.getOperator()
+ ",%' and betwen_time like '%,"
+ rule.getBetwen_time()
+ ",%' and ( android_version = ? or android_version = '-1' ) and ( open_channel = 'all' or open_channel like '%,"
+ rule.getOpen_channel()
+ ",%')) "
+ "and a.limit_count > 0 and  a.apk_id = b.id  and a.description_id = c.id";

==================

新增数据, now() 当前时间。

String sql = "insert into T_user ( mid,imei,imsi,channel,phone_model,package_name,ver_name,sys_version,sys_sdk_int,phone_number,install_type,sim_type,first_visit_time,last_visit_time,version,province,city,visit_day_count,visit_month_count,visit_count)" +
      "           values (?,  ?,   ?,    ?,     ?,          ?,            ?,       ?,          ?,          ?,          ?,            ?,       now(),           now(),          ?,      ?,       ?,1,1,1)";

=============
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: