-
wifi_control_computer
一个基于安卓平台的用wifi控制电脑的源代码(An Android-based platform for the control of a computer source code wifi)
- 2013-09-07 20:08:04下载
- 积分:1
-
code
《Android热门应用开发详解》邵长恒本书定位于已有一定基础的Android中高级开发相关人员及计算机爱好者学习使用,还可作为社会相关办学、大中专院校的辅助教材使用。( Android popular application development explain, Shao Changheng book targeted at Android has a certain basis of relevant personnel and senior developers learning to use a computer enthusiast, but also as social-related schools, colleges use teaching aids.)
- 2016-01-15 13:32:15下载
- 积分:1
-
Bluetooth_fwj
可以发送文件的蓝牙适配例子是一个可以选择文件并发送给对方的蓝牙例子源码,项目带有蓝牙可见性的控制和其他常规的功能,项目比较大,分了好多层但是比较给力的是源码有比较详细的注释,用到的朋友可以下载看一下,项目编译版本2.3.3默认编码UTF-8。(You can send files of Bluetooth adapter is an example to a file and send to the other Bluetooth example source code, control project with Bluetooth visibility and other routine functions, the project is relatively large, divided into many layers but more awesome is a more detailed source notes, the use of friends can look at the download the project compiled version of 2.3.3 default encoding UTF-8.)
- 2016-06-22 11:36:51下载
- 积分:1
-
WiFiDirectServiceDiscovery
WIFI直接的客户端,和服务端配合使用,Android4.0以后的功能,需要硬件的支持(WIFI Direct client and server with the use, Android4.0 later feature, you need hardware support)
- 2013-08-28 10:33:43下载
- 积分:1
-
gcc编译gd32f103
【实例简介】gcc编译gd32f103
- 2021-08-01 00:31:00下载
- 积分:1
-
lcIPC_SurfaceView
surface,H264,解码,显示,网络流,播放(surface, H264)
- 2013-08-06 10:18:16下载
- 积分:1
-
beijingyinyueshixianfangfa
android 的 背景音乐 是 实现方法 ,游戏里面 可以用此方法来实现背景音乐(android' s background music is implementation, the game which you can use this method to achieve the background music)
- 2011-08-08 10:36:40下载
- 积分:1
-
微信公众平台开发模式(JAVA) SDK/微信app
【核心代码】package com.gson;import java.io.File;import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.IOException;import java.lang.reflect.Field;import java.lang.reflect.Method;import java.util.Date;import java.util.Properties;import javax.servlet.Filter;import javax.servlet.FilterChain;import javax.servlet.FilterConfig;import javax.servlet.ServletException;import javax.servlet.ServletInputStream;import javax.servlet.ServletRequest;import javax.servlet.ServletResponse;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import org.apache.log4j.Logger;import com.gson.bean.Articles;import com.gson.bean.InMessage;import com.gson.bean.OutMessage;import com.gson.bean.TextOutMessage;import com.gson.inf.MessageProcessingHandler;import com.gson.util.Tools;import com.gson.util.XStreamFactory;import com.thoughtworks.xstream.XStream;/** * 请求拦截 * * @author GodSon * */public class WeChatFilter implements Filter { private final Logger logger = Logger.getLogger(WeChatFilter.class); private String _token; private String conf = "classPath:wechat.properties"; private String defaultHandler = "com.gson.inf.DefaultMessageProcessingHandlerImpl"; private Properties p; @Override public void destroy() { logger.info("WeChatFilter已经销毁"); } @Override public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { HttpServletRequest request = (HttpServletRequest) req; HttpServletResponse response = (HttpServletResponse) res; Boolean isGet = request.getMethod().equals("GET"); String path = request.getServletPath(); String pathInfo = path.substring(path.lastIndexOf("/")); if (pathInfo == null) { response.getWriter().write("error"); } else { _token = pathInfo.substring(1); if (isGet) { doGet(request, response); } else { doPost(request, response); } } } private void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException { response.setCharacterEncoding("UTF-8"); response.setContentType("text/xml"); OutMessage oms = new OutMessage(); ServletInputStream in = request.getInputStream(); // 转换微信post过来的xml内容 XStream xs = XStreamFactory.init(false); xs.alias("xml", InMessage.class); String xmlMsg = Tools.inputStream2String(in); logger.debug("输入消息:[" xmlMsg "]"); InMessage msg = (InMessage) xs.fromXML(xmlMsg); // 获取自定消息处理器,如果自定义处理器则使用默认处理器。 String handler = p.getProperty("MessageProcessingHandlerImpl"); if (handler == null) handler = defaultHandler; try { // 加载处理器 Class clazz = Class.forName(handler); MessageProcessingHandler processingHandler = (MessageProcessingHandler) clazz.newInstance(); // 取得消息类型 String type = msg.getMsgType(); Method mt = clazz.getMethod(type "TypeMsg", InMessage.class); oms = (OutMessage) mt.invoke(processingHandler, msg); if (oms == null) { oms = new TextOutMessage(); ((TextOutMessage) oms).setContent("系统错误!"); } setMsgInfo(oms,msg); } catch (Exception e) { logger.error(e); oms = new TextOutMessage(); ((TextOutMessage) oms).setContent("系统错误!"); try { setMsgInfo(oms,msg); } catch (Exception e1) { logger.error(e); } } // 把发送发送对象转换为xml输出 xs = XStreamFactory.init(true); xs.alias("xml", oms.getClass()); xs.alias("item", Articles.class); String xml = xs.toXML(oms); logger.debug("输出消息:[" xml "]"); response.getWriter().write(xml); } private void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { String signature = request.getParameter("signature");// 微信加密签名 String timestamp = request.getParameter("timestamp");// 时间戳 String nonce = request.getParameter("nonce");// 随机数 String echostr = request.getParameter("echostr");// // 验证 if (Tools.checkSignature(_token, signature, timestamp, nonce)) { response.getWriter().write(echostr); } } private void setMsgInfo(OutMessage oms,InMessage msg) throws Exception { // 设置发送信息 Class outMsg = oms.getClass().getSuperclass(); Field CreateTime = outMsg.getDeclaredField("CreateTime"); Field ToUserName = outMsg.getDeclaredField("ToUserName"); Field FromUserName = outMsg.getDeclaredField("FromUserName"); ToUserName.setAccessible(true); CreateTime.setAccessible(true); FromUserName.setAccessible(true); CreateTime.set(oms, new Date().getTime()); ToUserName.set(oms, msg.getFromUserName()); FromUserName.set(oms, msg.getToUserName()); } /** * 启动的时候加载wechat.properties配置 可以在过滤器配置wechat.properties路径 */ @Override public void init(FilterConfig config) throws ServletException { String cf = config.getInitParameter("conf"); if (cf != null) { conf = cf; } String classPath = this.getClass().getResource("/").getPath().replaceAll("%20", " "); conf = conf.replace("classPath:", classPath); p = new Properties(); File pfile = new File(conf); if (pfile.exists()) { try { p.load(new FileInputStream(pfile)); } catch (FileNotFoundException e) { logger.error("未找到wechat.properties", e); } catch (IOException e) { logger.error("wechat.properties读取异常", e); } } logger.info("WeChatFilter已经启动!"); }}
- 2014-01-21下载
- 积分:1
-
Android《戒烟》助手APP源代码
Android《戒烟》助手APP源代码,通过记录用户戒烟开始时间、每日抽烟数量和单价,向用户展示戒烟总时长和节省的费用。此外,用户还可以设定小目标、记录日记等。
软件环境:安卓4.0及以上操作系统。
可设置戒烟开始时间,抽烟数量和单价(以往个人习惯)
记录戒烟时间、节约费用
设置个人戒烟目标、记录日记等。
里面的日期选择器很漂亮哦。
- 2022-07-23 23:03:54下载
- 积分:1
-
GGMusic
可实现了一个简单的音乐播放器,可以播放音乐,暂停等(Can achieve a simple music player, can play music, pause, etc.)
- 2020-06-19 23:20:02下载
- 积分:1