android 获取App启动/关闭动作

上传者: hesongxing | 上传时间: 2023-03-14 00:55:01 | 文件大小: 47KB | 文件类型: ZIP
先通过ActivityManager判断程序是否正在运行,然后给该程序一状态标识,然后开一线程不停去检测标志位的状况,如果发生改变,再通过判断即可获取程序启动关闭的瞬间,然后即可做相应的动作。本程序以music为例、

文件下载

资源详情

[{"title":"( 25 个子文件 47KB ) android 获取App启动/关闭动作","children":[{"title":"check","children":[{"title":"bin","children":[{"title":"classes.dex <span style='color:#111;'> 5.26KB </span>","children":null,"spread":false},{"title":"check.apk <span style='color:#111;'> 14.76KB </span>","children":null,"spread":false},{"title":"com","children":[{"title":"check","children":[{"title":"mService.class <span style='color:#111;'> 2.46KB </span>","children":null,"spread":false},{"title":"R$layout.class <span style='color:#111;'> 367B </span>","children":null,"spread":false},{"title":"R$id.class <span style='color:#111;'> 354B </span>","children":null,"spread":false},{"title":"R$drawable.class <span style='color:#111;'> 373B </span>","children":null,"spread":false},{"title":"R$attr.class <span style='color:#111;'> 313B </span>","children":null,"spread":false},{"title":"R.class <span style='color:#111;'> 468B </span>","children":null,"spread":false},{"title":"CheckActivity.class <span style='color:#111;'> 1.21KB </span>","children":null,"spread":false},{"title":"mService$1.class <span style='color:#111;'> 1.38KB </span>","children":null,"spread":false},{"title":"R$string.class <span style='color:#111;'> 400B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"resources.ap_ <span style='color:#111;'> 10.39KB </span>","children":null,"spread":false}],"spread":true},{"title":"res","children":[{"title":"drawable-ldpi","children":[{"title":"icon.png <span style='color:#111;'> 1.68KB </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-hdpi","children":[{"title":"icon.png <span style='color:#111;'> 4.05KB </span>","children":null,"spread":false}],"spread":true},{"title":"values","children":[{"title":"strings.xml <span style='color:#111;'> 169B </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-mdpi","children":[{"title":"icon.png <span style='color:#111;'> 2.51KB </span>","children":null,"spread":false}],"spread":true},{"title":"layout","children":[{"title":"main.xml <span style='color:#111;'> 536B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"assets","children":null,"spread":false},{"title":"default.properties <span style='color:#111;'> 362B </span>","children":null,"spread":false},{"title":"gen","children":[{"title":"com","children":[{"title":"check","children":[{"title":"R.java <span style='color:#111;'> 723B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"proguard.cfg <span style='color:#111;'> 1.13KB </span>","children":null,"spread":false},{"title":"src","children":[{"title":"com","children":[{"title":"check","children":[{"title":"CheckActivity.java <span style='color:#111;'> 763B </span>","children":null,"spread":false},{"title":"mService.java <span style='color:#111;'> 1.91KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":".project <span style='color:#111;'> 841B </span>","children":null,"spread":false},{"title":".classpath <span style='color:#111;'> 280B </span>","children":null,"spread":false},{"title":"AndroidManifest.xml <span style='color:#111;'> 858B </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

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