实例介绍
LogService项目包括以下3个部分: 1. service 它负责接收客户应用的log信息,并把它发给activity显示。支持多个客户应用同时打log。 2. activity 它的布局包含一个TextView,用来显示log。 3. jar包,提供接口给客户应用,编译时使用,接口包括: Logy.open(Context context) 打开log服务,打开后就可以通过Logy.d打印。 Logy.close() 关闭log服务,如果不调用,应用退出时会自动关闭log服务。 Logy.d(String text) 打印log,text为需要打印的字符串。
【实例截图】
【核心代码】
4744302543328189094.zip
└── LogService
├── cn-livelog-logservice-api.jar
├── HelloActivity
│ ├── AndroidManifest.xml
│ ├── Android.mk
│ ├── assets
│ ├── bin
│ │ ├── AndroidManifest.xml
│ │ ├── classes
│ │ │ ├── cn
│ │ │ │ └── livelog
│ │ │ │ └── logservice
│ │ │ │ ├── ILogy$Stub$Proxy.class
│ │ │ │ ├── ILogy$Stub.class
│ │ │ │ ├── ILogy.class
│ │ │ │ ├── Logy$1.class
│ │ │ │ └── Logy.class
│ │ │ └── com
│ │ │ └── example
│ │ │ └── android
│ │ │ └── helloactivity
│ │ │ ├── BuildConfig.class
│ │ │ ├── HelloActivity$1.class
│ │ │ ├── HelloActivity$2.class
│ │ │ ├── HelloActivity.class
│ │ │ ├── R$attr.class
│ │ │ ├── R$id.class
│ │ │ ├── R$layout.class
│ │ │ ├── R$string.class
│ │ │ └── R.class
│ │ ├── classes.dex
│ │ ├── com.example.android.helloactivity.HelloActivity.apk
│ │ ├── res
│ │ └── resources.ap_
│ ├── gen
│ │ └── com
│ │ └── example
│ │ └── android
│ │ └── helloactivity
│ │ ├── BuildConfig.java
│ │ └── R.java
│ ├── libs
│ ├── project.properties
│ ├── res
│ │ ├── drawable-hdpi
│ │ ├── drawable-ldpi
│ │ ├── drawable-mdpi
│ │ ├── drawable-xhdpi
│ │ ├── layout
│ │ │ └── hello_activity.xml
│ │ └── values
│ │ └── strings.xml
│ ├── resource.properties
│ ├── src
│ │ ├── cn
│ │ │ └── livelog
│ │ │ └── logservice
│ │ │ ├── ILogy.java
│ │ │ └── Logy.java
│ │ └── com
│ │ └── example
│ │ └── android
│ │ └── helloactivity
│ │ └── HelloActivity.java
│ └── tests
│ ├── AndroidManifest.xml
│ ├── Android.mk
│ ├── assets
│ ├── bin
│ │ ├── AndroidManifest.xml
│ │ ├── classes
│ │ │ └── com
│ │ │ └── example
│ │ │ └── android
│ │ │ └── helloactivity
│ │ │ ├── HelloActivityTest.class
│ │ │ └── tests
│ │ │ └── BuildConfig.class
│ │ └── res
│ ├── build.properties
│ ├── gen
│ │ └── com
│ │ └── example
│ │ └── android
│ │ └── helloactivity
│ │ └── tests
│ │ └── BuildConfig.java
│ ├── project.properties
│ ├── res
│ │ ├── drawable-hdpi
│ │ ├── drawable-ldpi
│ │ ├── drawable-mdpi
│ │ ├── drawable-xhdpi
│ │ ├── layout
│ │ └── values
│ ├── resource.properties
│ └── src
│ └── com
│ └── example
│ └── android
│ └── helloactivity
│ └── HelloActivityTest.java
├── LogService
│ ├── AndroidManifest.xml
│ ├── Android.mk
│ ├── assets
│ │ ├── android_normal.png
│ │ ├── android_waving.png
│ │ ├── index2.html
│ │ ├── index.css
│ │ ├── index.html
│ │ ├── index.js
│ │ └── page1
│ │ ├── lakesky.jpg
│ │ ├── longroad.jpg
│ │ └── page1.html
│ ├── bin
│ │ ├── aidl
│ │ │ └── cn
│ │ │ └── livelog
│ │ │ └── logservice
│ │ │ ├── ILogy.aidl
│ │ │ ├── IRemoteService.aidl
│ │ │ └── IRemoteServiceCallback.aidl
│ │ ├── AndroidManifest.xml
│ │ ├── classes
│ │ │ └── cn
│ │ │ └── livelog
│ │ │ └── logservice
│ │ │ ├── BuildConfig.class
│ │ │ ├── ILogy$Stub$Proxy.class
│ │ │ ├── ILogy$Stub.class
│ │ │ ├── ILogy.aidl
│ │ │ ├── ILogy.class
│ │ │ ├── IRemoteService$Stub$Proxy.class
│ │ │ ├── IRemoteService$Stub.class
│ │ │ ├── IRemoteService.aidl
│ │ │ ├── IRemoteServiceCallback$Stub$Proxy.class
│ │ │ ├── IRemoteServiceCallback$Stub.class
│ │ │ ├── IRemoteServiceCallback.aidl
│ │ │ ├── IRemoteServiceCallback.class
│ │ │ ├── IRemoteService.class
│ │ │ ├── LogService$1.class
│ │ │ ├── LogService$2.class
│ │ │ ├── LogService$3.class
│ │ │ ├── LogService$Binding$1.class
│ │ │ ├── LogService$Binding$2.class
│ │ │ ├── LogService$Binding$3.class
│ │ │ ├── LogService$Binding$4.class
│ │ │ ├── LogService$Binding$5.class
│ │ │ ├── LogService$Binding.class
│ │ │ ├── LogService.class
│ │ │ ├── R$attr.class
│ │ │ ├── R$drawable.class
│ │ │ ├── R$id.class
│ │ │ ├── R$layout.class
│ │ │ ├── R$menu.class
│ │ │ ├── R$string.class
│ │ │ └── R.class
│ │ ├── classes.dex
│ │ ├── LogService.apk
│ │ ├── res
│ │ │ ├── drawable-hdpi
│ │ │ │ ├── alert_dialog_icon.png
│ │ │ │ └── app_sample_code.png
│ │ │ └── drawable-mdpi
│ │ │ ├── alert_dialog_icon.png
│ │ │ ├── app_sample_code.png
│ │ │ └── stat_sample.png
│ │ └── resources.ap_
│ ├── dropped text.txt
│ ├── gen
│ │ └── cn
│ │ └── livelog
│ │ └── logservice
│ │ ├── BuildConfig.java
│ │ ├── ILogy.java
│ │ ├── IRemoteServiceCallback.java
│ │ ├── IRemoteService.java
│ │ └── R.java
│ ├── libs
│ │ ├── android-support-v13.jar
│ │ └── android-support-v4.jar
│ ├── project.properties
│ ├── res
│ │ ├── drawable-hdpi
│ │ │ ├── alert_dialog_icon.png
│ │ │ └── app_sample_code.png
│ │ ├── drawable-ldpi
│ │ ├── drawable-mdpi
│ │ │ ├── alert_dialog_icon.png
│ │ │ ├── app_sample_code.png
│ │ │ └── stat_sample.png
│ │ ├── drawable-xhdpi
│ │ ├── layout
│ │ │ └── log_service_binding.xml
│ │ ├── menu
│ │ │ └── combined.xml
│ │ └── values
│ │ ├── colors.xml
│ │ └── strings.xml
│ ├── resource.properties
│ └── src
│ └── cn
│ └── livelog
│ └── logservice
│ ├── ILogy.aidl
│ ├── IRemoteService.aidl
│ ├── IRemoteServiceCallback.aidl
│ └── LogService.java
└── readme.txt
94 directories, 117 files
标签:
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论