当前位置: 首页 > 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://www.yutouwan.com/news/215805/

相关文章:

  • 网站优化 西安ps怎么做网站
  • 公司网站建设方案模板wordpress影视站主题
  • 网站代码素材网页模板素材网站
  • 柳州做网站的公司有哪些网站营销学多久
  • 网站后台功能模块wordpress支付宝
  • html网站设计模板下载建设工程公司简介
  • 苏州哪家做网站好些网站备案查询工信网
  • 做网站该去哪找客户室内装修免费咨询
  • 阿里云域名备案网站建设方案wordpress添加购物车功能
  • 医院网站建设课程代码辽宁建设工程信息网官网首页官方
  • 重庆做网站的程序员待遇专业网页设计工具
  • 外贸网站优化公司企业为什么要做网站
  • dedecms网站代理公司注册网站
  • 遵化建设招标网站无锡新吴区建设环保局网站
  • 我要啦免费统计怎么做网站手机网站打不开是什么原因造成的
  • 淘宝客优惠券网站建设教程视频法治中国建设网站
  • wordpress主题显示不出来seo排名技术教程
  • 中小企业网站建设效果更改域名代理商对网站有影响吗
  • 北京网站优化培训做网页和网站一样吗
  • 网站建设平台合同上饶网站网站建设
  • 做网站类型的营业执照证明如何填写芜湖集团网站建设
  • 校园二手用品网站建设的项目章程公众号软文素材
  • 做家乡网站的素材网络设计用什么软件
  • 西安做网站的云阔简约网站欣赏
  • 校级特色专业建设网站网站嵌入js
  • 做海报用什么网站工商公司注册核名查询
  • gta买办公室网站建设中谷歌翻译做多语言网站
  • 网站开发语言对比微网站 服务器
  • 下载手机app悟空建站seo服务
  • 怎么查询网站的外链作文网投稿