android 实现后台服务源码下载

上传者: u010156024 | 上传时间: 2015-03-14 00:00:00 | 文件大小: 1.64MB | 文件类型: rar
android APP后台服务可以长期与服务器进行长期的交互,保证数据的实时性,这个小项目主要实现的是在app退出之后依然可以运行服务。使用系统的Intent.ACTION_TIME_TICK进行实现,这个系统的广播每隔一分钟就进行广播一次,可以在程序中接收该广播消息,接收到之后检测app中的service服务是否在运行,如果在运行,则不处理,如果没有运行,则重新启动该service服务。

文件下载

资源详情

[{"title":"( 43 个子文件 1.64MB ) android 实现后台服务源码下载","children":[{"title":"ServiceTest","children":[{"title":".project <span style='color:#111;'> 847B </span>","children":null,"spread":false},{"title":"project.properties <span style='color:#111;'> 563B </span>","children":null,"spread":false},{"title":"src","children":[{"title":"com","children":[{"title":"yin","children":[{"title":"service","children":[{"title":"MyService.java <span style='color:#111;'> 921B </span>","children":null,"spread":false}],"spread":true},{"title":"servicetest","children":[{"title":"MyReceiver.java <span style='color:#111;'> 1.38KB </span>","children":null,"spread":false},{"title":"MainActivity.java <span style='color:#111;'> 360B </span>","children":null,"spread":false}],"spread":true},{"title":"application","children":[{"title":"MyApplication.java <span style='color:#111;'> 693B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"AndroidManifest.xml <span style='color:#111;'> 1.11KB </span>","children":null,"spread":false},{"title":"res","children":[{"title":"drawable-ldpi","children":null,"spread":false},{"title":"drawable-hdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 4.49KB </span>","children":null,"spread":false}],"spread":true},{"title":"values-v11","children":[{"title":"styles.xml <span style='color:#111;'> 334B </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-mdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 2.21KB </span>","children":null,"spread":false}],"spread":true},{"title":"layout","children":[{"title":"main.xml <span style='color:#111;'> 446B </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-xxhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 15.19KB </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-xhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 7.41KB </span>","children":null,"spread":false}],"spread":true},{"title":"values","children":[{"title":"strings.xml <span style='color:#111;'> 174B </span>","children":null,"spread":false},{"title":"styles.xml <span style='color:#111;'> 697B </span>","children":null,"spread":false}],"spread":true},{"title":"values-v14","children":[{"title":"styles.xml <span style='color:#111;'> 391B </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"assets","children":null,"spread":false},{"title":"gen","children":[{"title":"com","children":[{"title":"yin","children":[{"title":"servicetest","children":[{"title":"BuildConfig.java <span style='color:#111;'> 161B </span>","children":null,"spread":false},{"title":"R.java <span style='color:#111;'> 1.73KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"libs","children":[{"title":"android-support-v4.jar <span style='color:#111;'> 740.94KB </span>","children":null,"spread":false}],"spread":true},{"title":".classpath <span style='color:#111;'> 475B </span>","children":null,"spread":false},{"title":"proguard-project.txt <span style='color:#111;'> 781B </span>","children":null,"spread":false},{"title":"ic_launcher-web.png <span style='color:#111;'> 152.53KB </span>","children":null,"spread":false},{"title":"bin","children":[{"title":"resources.ap_ <span style='color:#111;'> 28.70KB </span>","children":null,"spread":false},{"title":"classes","children":[{"title":"com","children":[{"title":"yin","children":[{"title":"service","children":[{"title":"MyService.class <span style='color:#111;'> 1.42KB </span>","children":null,"spread":false}],"spread":false},{"title":"servicetest","children":[{"title":"R$layout.class <span style='color:#111;'> 397B </span>","children":null,"spread":false},{"title":"R$style.class <span style='color:#111;'> 434B </span>","children":null,"spread":false},{"title":"BuildConfig.class <span style='color:#111;'> 347B </span>","children":null,"spread":false},{"title":"R$drawable.class <span style='color:#111;'> 410B </span>","children":null,"spread":false},{"title":"R$attr.class <span style='color:#111;'> 343B </span>","children":null,"spread":false},{"title":"R.class <span style='color:#111;'> 544B </span>","children":null,"spread":false},{"title":"R$string.class <span style='color:#111;'> 436B </span>","children":null,"spread":false},{"title":"MainActivity.class <span style='color:#111;'> 606B </span>","children":null,"spread":false},{"title":"MyReceiver.class <span style='color:#111;'> 2.26KB </span>","children":null,"spread":false}],"spread":false},{"title":"application","children":[{"title":"MyApplication.class <span style='color:#111;'> 1015B </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":false}],"spread":false},{"title":"ServiceTest.apk <span style='color:#111;'> 300.59KB </span>","children":null,"spread":false},{"title":"AndroidManifest.xml <span style='color:#111;'> 1.11KB </span>","children":null,"spread":false},{"title":"dexedLibs","children":[{"title":"android-support-v4-e5a49945bc9c3a6f3274000ffe64eed2.jar <span style='color:#111;'> 267.35KB </span>","children":null,"spread":false}],"spread":false},{"title":"jarlist.cache <span style='color:#111;'> 120B </span>","children":null,"spread":false},{"title":"res","children":[{"title":"crunch","children":[{"title":"drawable-hdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 3.83KB </span>","children":null,"spread":false}],"spread":false},{"title":"drawable-mdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 1.89KB </span>","children":null,"spread":false}],"spread":false},{"title":"drawable-xxhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 13.23KB </span>","children":null,"spread":false}],"spread":false},{"title":"drawable-xhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 6.30KB </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":false},{"title":"classes.dex <span style='color:#111;'> 799.21KB </span>","children":null,"spread":false}],"spread":true}],"spread":false}],"spread":true}]

评论信息

  • weixin_38537628 :
    可以 但不是我想要的
    2017-12-25
  • android新人 :
    各种问题 没用上 感谢分享
    2017-12-20
  • skystar_2016 :
    结束了程序,并不能自动启动,在安卓5.0下测试的
    2017-12-04
  • BruceCoder :
    手动关闭前台app后并不能重启,也就是在应用程序列表里看不到该软件正在运行
    2017-06-16
  • lfcliu :
    结束了程序,并不能自动启动,在安卓5.0下测试的
    2017-01-25

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明