广告平台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
====================
====================
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)";
=============
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)";
=============
相关文章推荐
- API数据接口_免费数据调用接口-聚合数据
- 角色动画视频教程社区
- 如何把幻灯片ppt转换成视频_百度经验
- 金和IU APP自助工厂 APP免费制作
- phpcms总结(转)
- CSS块级元素和行内元素
- VMware Workstation 10序列号
- android,获取当前时间。24小时。
- 博弈论初探----DAG上的NIM
- servlet中文乱码
- [LeetCode] 17. Letter Combinations of a Phone Number
- Android,获取当前手机号
- android,rom,厨房环境搭建
- 互联网研发团队-岗位职责
- 互联网研发团队-岗位职责
- 异或求和式 (数位DP)
- Python核心编程--学习计划
- CSS使用浮动属性和边距设计3行3列定宽的布局实例
- adnroid,notification通知栏的使用
- android,锁屏控制音乐