登录
首页 » Android » Android 下载文件示例:多线程断点续传下载

Android 下载文件示例:多线程断点续传下载

于 2022-08-11 发布 文件大小:21.08 kB
0 208
下载积分: 2 下载次数: 1

代码说明:

安卓源码下载,Android网络下载文件一例,采用多线程断点续传下载,当Handler被创建会关联到创建它的当前线程的消息队列,该类用于往消息队列发送消息,消息队列中的消息由当前线程内部进行处理,主线程(UI线程),对于显示控件的界面更新只是由UI线程负责,如果是在非UI线程更新控件的属性值,更新后的显示界面不会反映到屏幕上。

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

发表评论

0 个回复

  • 功能测试参考代码
    @Override public void onItemClick(AdapterView parent, View view, int position, long id) { // TODO Auto-generated method stub Toast.makeText(getApplicationContext(), itemName.get(position), Toast.LENGTH_SHORT).show(); isAllTest = false; switch (position) { case 0: startCorrelationActivity(TouchEdgeActivity.class); break; case 1: startCorrelationActivity(ScreenActivity.class); break; case 2: startCorrelationActivity(SpeekActivity.class); break; case 3: startCorrelationActivity(WifiActivity.class); break; case 4: startCorrelationActivity(WifiProbeActivity.class); brea
    2022-01-22 15:12:48下载
    积分:1
  • finalassignment
    android 移动应用系统设计 1、最后提交两部分内容 a. 对一个功能的实现+实验报告(该项作为平时作业成绩) - 可以选择上课中所演示的任意功能,截图完成实验报告 - 需要提交程序 + 3-5页的实验报告 b. 从以下网址下载一个app源码,或者其它地方的源码,对代码进行详细解析(该项作为期末课程考核成绩) - 推荐下载网址为:http://www.devstore.cn/code/list/pn1-or0.html - 需要提交下载的源码,和对该源码实现的分析报告,不少于8页 2、将所有内容按下面两个目录进行存放,打包以“学号+姓名” 命名,上传到作业ftp - 实验 - 课程综合(android mobile application system design 1, the final submission of two parts a test report achieve+ a function (such as the usual job performance)- You can any function demonstrated in class, theme complete test report- to be submitted program+ Experimental report b 3-5 pages downloaded the following URL an app source code, or elsewhere source, detailed analysis of the code (such as the end of course examination results)- Recommended download site at: http: //www.devstore .cn/code/list/pn1-or0.html- to submit to download the source code, and analysis of the source code to achieve, at least 8 2, all the content stored in the following two directories, packed to " learn No.+ name " name, upload to job ftp- Experiment- Integrated Course)
    2015-11-17 10:36:12下载
    积分:1
  • Android_UI
    ※ 第一篇:介紹應用框架概念、原理和特性。 ※ 第二篇:闡述應用框架之設計技巧。亦即,如何打造應用框架。 (註:如果你的職務是「使用」Android 框架來開發應用程式的話,可以跳過本篇,直接進 入第三篇。) ※ 第三篇:說明及演練Android 應用程式設計的36 技。 ※ 第四篇:介紹Android 框架與硬體之間C 組件的開發流程及工具。
    2012-02-27 16:04:39下载
    积分:1
  • Android常用的工具类
    Android常用工具类,包括MD5加密,获取设备信息工具类,打印log工具类,还有asynchttp相关类
    2022-03-13 06:49:01下载
    积分:1
  • Android 开源框架ViewPageIndicato
    本地视频录制,自动对焦,焦距,分辨率设置
    2015-04-15下载
    积分:1
  • DevsmartLib-Android
    Horizontal ListView的android布局使用例子,Android 水平Listview列表视图实例,有源码包和实例包,注释比较多,不过是英文的,使用ListView开发android应用时,这是个实用的技巧,闲暇时可参考下(Android layout Horizontal ListView using examples, Android Listview level list view instance, there are examples of packages and source packages, comment more, but in English, when using ListView android application development, this is a practical tips, refer to the following leisure)
    2014-04-21 09:42:07下载
    积分:1
  • android open gl 示例代码下载
    [实例简介]Open GL 入门级示例 [实例截图] [核心代码]package com.china.gltry;import javax.microedition.khronos.egl.EGL10;import javax.microedition.khronos.egl.EGL11;import javax.microedition.khronos.egl.EGLConfig;import javax.microedition.khronos.egl.EGLContext;import javax.microedition.khronos.egl.EGLDisplay;import javax.microedition.khronos.egl.EGLSurface;import javax.microedition.khronos.opengles.GL;import android.view.SurfaceHolder;/** * An EGL helper class. */public class EGLHelper{ public EGLHelper() { } /** * Initialize EGL for a given configuration spec. * @param configSpec */ public void start(int[] configSpec){ /* * Get an EGL instance */ mEgl = (EGL10) EGLContext.getEGL(); /* * Get to the default display. */ mEglDisplay = mEgl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY); /* * We can now initialize EGL for that display */ int[] version = new int[2]; mEgl.eglInitialize(mEglDisplay, version); EGLConfig[] configs = new EGLConfig[1]; int[] num_config = new int[1]; mEgl.eglChooseConfig(mEglDisplay, configSpec, configs, 1, num_config); mEglConfig = configs[0]; /* * Create an OpenGL ES context. This must be done only once, an * OpenGL context is a somewhat heavy object. */ mEglContext = mEgl.eglCreateContext(mEglDisplay, mEglConfig, EGL10.EGL_NO_CONTEXT, null); mEglSurface = null; } /* * Create and return an OpenGL surface */ public GL createSurface(SurfaceHolder holder) { /* * The window size has changed, so we need to create a new * surface. */ if (mEglSurface != null) { /* * Unbind and destroy the old EGL surface, if * there is one. */ mEgl.eglMakeCurrent(mEglDisplay, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT); mEgl.eglDestroySurface(mEglDisplay, mEglSurface); } /* * Create an EGL surface we can render into. */ mEglSurface = mEgl.eglCreateWindowSurface(mEglDisplay, mEglConfig, holder, null); /* * Before we can issue GL commands, we need to make sure * the context is current and bound to a surface. */ mEgl.eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface, mEglContext); GL gl = mEglContext.getGL(); return gl; } /** * Display the current render surface. * @return false if the context has been lost. */ public boolean swap() { mEgl.eglSwapBuffers(mEglDisplay, mEglSurface); /* * Always check for EGL_CONTEXT_LOST, which means the context * and all associated data were lost (For instance because * the device went to sleep). We need to sleep until we * get a new surface. */ return mEgl.eglGetError() != EGL11.EGL_CONTEXT_LOST; } public void finish() { if (mEglSurface != null) { mEgl.eglMakeCurrent(mEglDisplay, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT); mEgl.eglDestroySurface(mEglDisplay, mEglSurface); mEglSurface = null; } if (mEglContext != null) { mEgl.eglDestroyContext(mEglDisplay, mEglContext); mEglContext = null; } if (mEglDisplay != null) { mEgl.eglTerminate(mEglDisplay); mEglDisplay = null; } } EGL10 mEgl; EGLDisplay mEglDisplay; EGLSurface mEglSurface; EGLConfig mEglConfig; EGLContext mEglContext;}
    2015-04-06下载
    积分:1
  • Android 签到系统源码
    Android 签到系统源码
    2016-02-29下载
    积分:1
  • 使用Gson快速解析json数据
    资源描述当你还在为复杂是json数据解析烦恼时,是否想找一个快速、简单解析json数据的方法呢?那么现在就带你一起来看看如何做到的吧。
    2022-05-16 13:40:52下载
    积分:1
  • 基于android的身高体重指数计算
    本代码适合那些刚入门学习android的人,这个简单的APP带有比较简单的界面,并且注释比较详细,适合刚学习android界面组件的人
    2022-05-05 12:25:09下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载