当前位置: 首页 > news >正文

明薇通网站建设价格深圳做网站哪里好

明薇通网站建设价格,深圳做网站哪里好,四川省住房和城乡建设厅厅长,慕课网电子商务网站开发为什么80%的码农都做不了架构师#xff1f; ion是的一个安卓异步网络和图片加载库。 特性 异步下载#xff1a;下载图片 (用ImageViews 或者 Bitmaps显示)#xff1b;下载JSON文件 (通过Gson解析)#xff1b;下载字符串#xff1b;下载文件#xff1b;Flu… 为什么80%的码农都做不了架构师         ion是的一个安卓异步网络和图片加载库。 特性 异步下载下载图片 (用ImageViews 或者 Bitmaps显示)下载JSON文件 (通过Gson解析)下载字符串下载文件Fluent API当呼叫活动calling Activity结束时可以自动取消网络操作。所有的操作都返回一个Futurehttp://en.wikipedia.org/wiki/Futures_and_promises并且可以取消HTTP POST/PUT缓存Gzip/Deflate 压缩当有多个IP地址时自动选择最好最稳定的服务器连接 9. 支持Cookies 等等。Github 项目地址为 ion github Eclipse jar包导入形式   需要使用到两个jar 分别为 androidasync.jar  和 Ion.jar 个人测试 下载文件部分代码如下    public static void NewDownload(RequestParams params,final Context mcontext,final BaseInfo t){progressBar  new ProgressBar(mcontext);progressDialog  new ProgressDialog(mcontext);LogCat.i(Constants.getLogTag(), Constants.getRequestHost()t.getDownloadUrl());final NotificationManager nm  (NotificationManager) mcontext.getSystemService(Context.NOTIFICATION_SERVICE);final Notification.Builder builder  new Notification.Builder(mcontext);builder.setWhen(System.currentTimeMillis()).setContentTitle(t.getName() 下载中).setContentText(t.getVersionName());builder.setLargeIcon(bitmap);builder.setSmallIcon(R.drawable.download_icon);File file  Environment.getExternalStorageDirectory();File file2  new File(file, down);file2.mkdir();file2  new File(file2,t.getName() .apk);Ion.with(mcontext).load(Constants.getRequestHost()t.getDownloadUrl()).progressBar(progressBar).progressDialog(progressDialog).progress( new ProgressCallback() {Overridepublic void onProgress( long downloaded, long total) {builder.setProgress(( int)(total/(1024*1024)), (int)downloaded/(1024*1024), false);builder.setContentText(downloaded/(1024*1024) .downloaded%(1024*1024) M  /   (total/(1024*1024)).(total%(1024*1024))M );Intent intent  new Intent(mcontext,DownloadingActivity.class );Bundle bundle  new Bundle();bundle.putLong( downloaded, downloaded);bundle.putLong( total, total);bundle.putSerializable( appInfo, t);intent.putExtras(bundle);intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);PendingIntent pendintent PendingIntent.getActivity(mcontext, Notification_id, intent, PendingIntent.FLAG_UPDATE_CURRENT);builder.setContentIntent(pendintent);Notification notification  builder.getNotification();nm.notify(Notification_id, notification);}}).write(file2).setCallback( new FutureCallbackFile() {Overridepublic void onCompleted(Exception e, File file) {if (e  null) {AppUtil.install(mcontext, Environment.getExternalStorageDirectory()File.separatordown File.separatort.getName().apk);nm.cancel(Notification_id);} else{Utils.showToast(mcontext, 下载失败请稍后重试 );nm.cancel(Notification_id);}}});} 根据请求使用Notification的形式动态展示 当前下载进度展示并设定了 PendingIntent 点击Notification时跳转特定页面并展示当前下载进度。 转载于:https://my.oschina.net/leov1/blog/506451
http://wiki.neutronadmin.com/news/215805/

相关文章:

  • 网站开发流程及详解网络品牌营销
  • 想自己做一个网站应该怎么弄手机免播看成片
  • 基层建设网站成都专业网站建设费用
  • 企业 网站 程序wordpress rss 订阅
  • 山东飞鸿建设集团网站甘肃省住房和建设厅网站首页
  • asp 制作网站开发html5软件
  • 建设电商网站所需硬件怎么注册一个网站做色流
  • 恩施做网站多少钱vs网站开发实例
  • c 网站开发视频网站建设与网站开发
  • 做化妆品等的网站合肥企业网站营销电话
  • 免费素材网站psd众v创业营网站开发
  • 比较好的做网站外包公司什么意思
  • 做免费网站推广开头语app开发公司怎么收费
  • 抛丸机网站排名优化徐州做网站谁家最专业
  • 做网站推广维护需要学些什么软件开发网站开发学习
  • 长沙品质企业建站服务电话网站建设电话销售技巧和话术
  • 怎样创建网站详细步骤网店网络营销策划方案
  • 网站人多怎么优化wordpress content.php
  • 网站上咱们做鱼饵做网站公司大连
  • 北京网站建站推广网站开发的人李海涛
  • 黄埔五屏网站建设电子网址怎么创建
  • 网站首页分辨率做多大的北京电力交易中心史连军
  • 福州建设局网站xp怎么做网站服务器
  • 长春火车站附近有什么好玩的地方大数据培训班
  • 外贸网站流量网站的权限设置
  • 东营房产信息网seo需要懂代码吗
  • 自己做网站去哪买服务器重庆广告网站推广
  • 网站建立有哪些功能做视频采集网站违法吗
  • 网站开发费税率是多少门户网站开发的背景和意义
  • 网页设计制作网站大一素材vs做网站好不好