Code Monkey home page Code Monkey logo

autouploadchecker's Introduction

AutoUploadChecker

应用检查更新,多线程断点下载apk,可暂停、续传,下载完成后自动安装apk.

使用方法: 1.复制lib工程至eclipse; 2.在应用工程中引用该lib工程; 3.在引用程序的AndroidManifest.xml中加入

       <service
        android:name="com.yyxu.download.services.DownloadService"
        android:exported="true"> 
       </service>
       
加入以下权限
       
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />

       
4.调用lib中的方法:


    UpdateChecker.setUpdateServerUrl(serverUrl);
UpdateChecker.checkForDialog(context); 
	
或
	
	
UpdateChecker.setUpdateServerUrl(serverUrl);
UpdateChecker.checkForNotification(context); 
	
serverUrl为服务端请求地址,需打印出知道格式的Json字符串,如:
    JSONObject json=new JSONObject();
    json.put("url",            "http://shouji.360tpcdn.com/140807/c27d9c5fc735edd2bbca86e53abcddf1/com.tencent.mobileqq_146.apk");
    json.put("updateMessage", "1.全新界面;\n2.新增多人通话功能;\n3.优化性能,运行更流畅;\n4.修复已知bug。");
    json.put("versionCode",2);
    out.print(json.toString());

autouploadchecker's People

Contributors

feng12345566 avatar

Watchers

James Cloos avatar Harry Chen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.