登录
首页 » Java » android 判断双SD卡_CheckDoubleSDCard 例子源码

android 判断双SD卡_CheckDoubleSDCard 例子源码

于 2014-10-01 发布
0 234
下载积分: 1 下载次数: 0

代码说明:

android 判断双SD卡_CheckDoubleSDCard 例子源码

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • android Sqlite 实例源码下载
    android Sqlite 实例源码下载
    2014-08-06下载
    积分:1
  • 安卓图表引擎AChartEngine 实例源码下载
    用于网页端基于achartengine开放的曲线
    2015-04-14下载
    积分:1
  • android 读取xml文件 pull实现 附源码
    在android系统 使用pull解析xml文件
    2013-02-27下载
    积分:1
  • android 猜名字 有奖例子 完整源码
    一个简单的android 实例,用RadioButton 以及RadioGroup实现                              
    2013-07-22下载
    积分:1
  • Gson 实体类和json之间相互转化例子
    Gson 实体类和json之间相互转化例子
    2015-06-05下载
    积分:1
  • Android 应用程序自动升级 更新至新版本 例子 有截图 附完整源码
    由于Android项目开源所致,市面上出现了N多安卓软件市场。为了让我们开发的软件有更多的用户使用,我们需要向N多市场发布,软件升级后,我们也必须到安卓市场上进行更新,给我们增加了工作量。因此我们有必要给我们的Android应用增加自动更新的功能。既然实现自动更新,我们首先必须让我们的应用知道是否存在新版本的软件,因此我们可以在自己的网站上放置配置文件,存放软件的版本信息: 2 baidu_xinwen_1.1.0 http://gdown.baidu.com/data/wisegame/f98d235e39e29031/baiduxinwen.apk在这里我使用的是XML文件,方便读取。由于XML文件内容比较少,因此可通过DOM方式进行文件的解析public class ParseXmlService{ public HashMap parseXml(InputStream inStream) throws Exception { HashMap hashMap = new HashMap(); // 实例化一个文档构建器工厂 DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); // 通过文档构建器工厂获取一个文档构建器 DocumentBuilder builder = factory.newDocumentBuilder(); // 通过文档通过文档构建器构建一个文档实例 Document document = builder.parse(inStream); //获取XML文件根节点 Element root = document.getDocumentElement(); //获得所有子节点 NodeList childNodes = root.getChildNodes(); for (int j = 0; j < childNodes.getLength(); j ) { //遍历子节点 Node childNode = (Node) childNodes.item(j); if (childNode.getNodeType() == Node.ELEMENT_NODE) { Element childElement = (Element) childNode; //版本号 if ("version".equals(childElement.getNodeName())) { hashMap.put("version",childElement.getFirstChild().getNodeValue()); } //软件名称 else if (("name".equals(childElement.getNodeName()))) { hashMap.put("name",childElement.getFirstChild().getNodeValue()); } //下载地址 else if (("url".equals(childElement.getNodeName()))) { hashMap.put("url",childElement.getFirstChild().getNodeValue()); } } } return hashMap; }}通过parseXml()方法,我们可以获取服务器上应用的版本、文件名以及下载地址。紧接着我们就需要获取到我们手机上应用的版本信息:/** * 获取软件版本号 * * @param context * @return */private int getVersionCode(Context context){ int versionCode = 0; try { // 获取软件版本号, versionCode = context.getPackageManager().getPackageInfo("com.szy.update", 0).versionCode; } catch (NameNotFoundException e) { e.printStackTrace(); } return versionCode;}           通过该方法我们获取到的versionCode对应AndroidManifest.xml下android:versionCode。android:versionCode和android:versionName两个属性分别表示版本号,版本名称。versionCode是整数型,而versionName是字符串。由于versionName是给用户看的,不太容易比较大小,升级检查时,就可以检查versionCode。把获取到的手机上应用版本与服务器端的版本进行比较,应用就可以判断处是否需要更新软件。处理流程                                  
    2013-07-06下载
    积分:1
  • android 天气预报示例源码下载(一个简易的天气预报)
    android 天气预报示例源码下载(一个简易的天气预报)
    2014-04-15下载
    积分:1
  • Android手机虚拟GPS定位源码
    利用hook实现GPS虚拟定位
    2018-01-25下载
    积分:1
  • 远程视频监控
    【核心代码】 public interface CameraSource {  static final String LOG_TAG = "camera";  /**  * Open the camera source for subsequent use via calls to capture().  *   * @return true if the camera source was successfully opened.  */  boolean open();  /**  * Close the camera source. Calling close on a closed CameraSource is  * permitted but has no effect. The camera source may be reopened after  * being closed.  */  void close();  /**  * The width of the captured image.  *   * @return the width of the capture in pixels  */  int getWidth();  /**  * The height of the captured image.  *   * @return the height of the capture in pixels  */  int getHeight();  /**  * Attempts to render the current camera view onto the supplied canvas.  * The capture will be rendered into the rectangle (0,0,width,height).  * Outstanding transformations on the canvas may alter this.  *   * @param canvas the canvas to which the captured pixel data will be written  * @return true iff a frame was successfully written to the canvas  */  boolean capture(Canvas canvas);  boolean saveImage(String savePath, String fileName); }
    2013-12-04下载
    积分:1
  • android下Intent传递实例 附完整源码
    Intent传递实例
    2013-03-30下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载