Android 开源项目第二篇——工具库篇

Android 开源项目第二篇——工具库篇

第二部分 工具库

主要包括那些不错的开发库,包括依赖注入框架、图片缓存、网络请求、数据库 ORM 建模、Android 公共库、Android 高版本向低版本兼容、多媒体相关及其他。

一、依赖注入 DI

通过依赖注入减少 View、服务、资源简化初始化,事件绑定等重复繁琐工作

  1. AndroidAnnotations(Code Diet)
    android 快速开发框架
    项目地址:https://github.com/excilys/androidannotations
    文档介绍:https://github.com/excilys/androidannotations/wiki
    官网网址:http://androidannotations.org/
    特点:(1) 依赖注入:包括 view,extras,系统服务,资源等等
    (2) 简单的线程模型,通过 annotation 表示方法运行在 ui 线程还是后台线程
    (3) 事件绑定:通过 annotation 表示 view 的响应事件,不用在写内部类
    (4) REST 客户端:定义客户端接口,自动生成 REST 请求的实现
    (5) 没有你想象的复杂:AndroidAnnotations 只是在在编译时生成相应子类
    (6) 不影响应用性能:仅 50kb,在编译时完成,不会对运行时有性能影响。
    其他:与 roboguice 的比较:roboguice 通过运行时读取 annotations 进行反射,所以可能影响应用性能,而 AndroidAnnotations 在编译时生成子类,所以对性能没有影响

  2. roboguice
    帮你处理了很多代码异常,利用 annotation 使得更少的代码完成项目
    项目地址:https://github.com/roboguice/roboguice
    文档介绍:https://github.com/roboguice/roboguice/wiki

  3. butterknife
    利用 annotation 帮你快速完成 View 的初始化,减少代码
    项目地址:https://github.com/JakeWharton/butterknife
    文档介绍:http://jakewharton.github.io/butterknife/

  4. Dagger
    依赖注入,适用于 Android 和 Java
    项目地址:https://github.com/square/dagger
    原理剖析文档:Dagger
    文档介绍:http://square.github.io/dagger/

  5. AutoParcel
    注解自动生成Parcelable实现代码的库
    项目地址:https://github.com/frankiesardo/auto-parcel
    这篇文章详细介绍了它的使用方法:AutoParcel
    作者认为使用AutoParcel的好处是,可以简化构造函数,方便IDE代码自动完成,方便测试,前向兼容,生成不可变的对象。
    文档介绍:https://github.com/frankiesardo/auto-parcel

二、图片缓存
  1. Android-Universal-Image-Loader
    图片缓存,目前使用最广泛的图片缓存,支持主流图片缓存的绝大多数特性。
    项目地址:https://github.com/nostra13/Android-Universal-Image-Loader
    原理剖析文档:Android-Universal-Image-Loader
    Demo 地址:https://github.com/Trinea/TrineaDownload/blob/master/universal-imageloader-demo.apk?raw=true
    文档介绍:http://www.intexsoft.com/blog/item/74-universal-image-loader-part-3.html

  2. picasso
    square 开源的图片缓存
    项目地址:https://github.com/square/picasso
    文档介绍:http://square.github.io/picasso/
    特点:(1)可以自动检测 adapter 的重用并取消之前的下载
    (2)图片变换
    (3)可以加载本地资源
    (4)可以设置占位资源
    (5)支持 debug 模式

  3. Cube ImageLoader
    阿里巴巴一淘使用的图片加载,综合了 Android-Universal-Image-Loader 和 square 等组件优点,简单易用,良好的中文文档支持
    项目地址:https://github.com/etao-open-source/cube-sdk
    Demo 地址:https://github.com/liaohuqiu/cube-sdk/raw/master/cube-sdk-sample.apk
    文档介绍:http://cube-sdk.liaohuqiu.net/
    效果图:Renderings

  4. fresco
    一款强大的图片缓存工具,由 Facebook 开发
    项目地址:https://github.com/facebook/fresco
    文档介绍:http://frescolib.org/
    特点:(1) 两个内存缓存加上磁盘缓存构成了三级缓存
    (2) 支持流式,可以类似网页上模糊渐进式显示图片
    (3) 对多帧动画图片支持更好,如 Gif、WebP
    (4) 更多样的显示,如圆角、进度条、点击重试、自定义对焦点
    (5) 更多样的加载,如支持 EXIF、全面支持 WebP
    (6) 支持 Android 2.3+

  5. Glide
    Glide 是一个 android 平台上的快速和高效的开源的多媒体资源管理库,提供 多媒体文件的压缩,内存和磁盘缓存, 资源池的接口。
    它可以最大性能地在 Android 设备上读取、解码、显示图片和视频。Glide 可以将远程的图片、视频、动画图片等缓存在设备本地便于提高用户浏览图片的流畅体验。
    项目地址:https://github.com/bumptech/glide
    特点:
    (1) GIF 动画的解码
    (2) 本地视频剧照的解码
    (3) 支持缩略图
    (4) Activity 生命周期的集成
    (5) 转码的支持
    (6) 动画的支持
    (7) OkHttp 和 Volley 的支持

三、网络请求
  1. Volley
    Google 提供的网络通信库,使得网络请求更简单、更快速
    项目地址:https://android.googlesource.com/platform/frameworks/volley
    文档介绍:http://commondatastorage.googleapis.com/io-2013/presentations/110%20-%20Volley-%20Easy,%20Fast%20Networking%20for%20Android.pdf

  2. Asynchronous Http Client for Android
    Android 异步 Http 请求
    项目地址:https://github.com/loopj/android-async-http
    文档介绍:http://loopj.com/android-async-http/
    特点:(1) 在匿名回调中处理请求结果
    (2) 在 UI 线程外进行 http 请求
    (3) 文件断点上传
    (4) 智能重试
    (5) 默认 gzip 压缩
    (6) 支持解析成 Json 格式
    (7) 可将 Cookies 持久化到 SharedPreferences

  3. android-query
    异步加载,更少代码完成 Android 加载
    项目地址:https://github.com/androidquery/androidquery 或 https://code.google.com/p/android-query/
    Demo 地址:https://play.google.com/store/apps/details?id=com.androidquery
    文档介绍:https://code.google.com/p/android-query/#Why_AQuery?
    特点:https://code.google.com/p/android-query/#Why_AQuery?

  4. Async Http Client
    Java 异步 Http 请求
    项目地址:https://github.com/AsyncHttpClient/async-http-client
    文档介绍:http://sonatype.github.io/async-http-client/

  5. Ion
    支持图片、json、http post 等异步请求
    项目地址:https://github.com/koush/ion
    文档介绍:https://github.com/koush/ion#more-examples

  6. Http Request
    项目地址:https://github.com/kevinsawicki/http-request
    文档介绍:https://github.com/kevinsawicki/http-request#examples

  7. okhttp
    square 开源的 http 工具类
    项目地址:https://github.com/square/okhttp
    文档介绍:http://square.github.io/okhttp/
    特点:(1) 支持 SPDY( http://zh.wikipedia.org/wiki/SPDY )协议。SPDY 协议是 Google 开发的基于传输控制协议的应用层协议,通过压缩,多路复用(一个 TCP 链接传送网页和图片等资源)和优先级来缩短加载时间。
    (2) 如果 SPDY 不可用,利用连接池减少请求延迟
    (3) Gzip 压缩
    (4) Response 缓存减少不必要的请求

  8. Retrofit
    RESTFUL API 设计
    项目地址:https://github.com/square/retrofit
    文档介绍:http://square.github.io/retrofit/

  9. RoboSpice
    Android 异步网络请求工具,支持缓存、REST 等等
    项目地址:https://github.com/stephanenicolas/robospice
    Demo 地址:https://github.com/stephanenicolas/RoboDemo/downloads

  10. TwistVolley
    TwistVolley 是对 Volley 的一个封装库。提供类似 Picasso 一样的串联式 API。使得使用 Volley 更加方便。
    项目地址:https://github.com/TwistedEquations/TwistVolley

四、数据库 orm 工具包

orm 的 db 工具类,简化建表、查询、更新、插入、事务、索引的操作

  1. greenDAO
    Android Sqlite orm 的 db 工具类
    项目地址:https://github.com/greenrobot/greenDAO
    文档介绍:http://greendao-orm.com/documentation/
    官网网址:http://greendao-orm.com/
    特点:(1) 性能佳
    (2) 简单易用的 API
    (3) 内存小好小
    (4) 库大小小

  2. GreenDaoUpgradeHelper
    greenDAO的数据库升级帮助类,只需一行代码解决数据库升级
    项目地址:https://github.com/yuweiguocn/GreenDaoUpgradeHelper

  3. ActiveAndroid
    Android Sqlite orm 的 db 工具类
    项目地址:https://github.com/pardom/ActiveAndroid
    文档介绍:https://github.com/pardom/ActiveAndroid/wiki/_pages

  4. Sprinkles
    Android Sqlite orm 的 db 工具类,比较显著的特点就是配合 https://github.com/square/retrofit 能保存从服务器获取的数据
    项目地址:https://github.com/emilsjolander/sprinkles
    文档介绍:http://emilsjolander.github.io/blog/2013/12/18/android-with-sprinkles/

  5. Realm
    移动端的数据库,适用于 Phone、Tablet、Wearable,支持 ORM,线程安全、支持连表及数据库加密,比 SQLite 性能更好
    项目地址:https://github.com/realm/realm-java
    文档介绍:http://realm.io/docs/java/0.72.0/

  6. ormlite-android
    项目地址:https://github.com/j256/ormlite-android
    文档介绍:http://ormlite.com/sqlite_java_android_orm.shtml

  7. Schematic
    根据 SQLite 生成 ContentProvider
    项目地址:https://github.com/SimonVT/schematic

  8. DBFlow
    Android SQLite ORM 工具库。综合了 Active Android, Schematic, Ollie,Sprinkles 等库的优点;通过注解实现,性能好;能生成 ContentProvider。
    项目地址:https://github.com/Raizlabs/DBFlow
    文档介绍:https://github.com/Raizlabs/DBFlow#usage-docs

  9. SnappyDB SnappyDB是一个key-value数据库,非常流行的NoSQL数据库。 项目地址:https://github.com/nhachicha/SnappyDB 演示Demo:https://play.google.com/store/apps/details?id=com.snappydb.snippets.app 性能对比图: Renderings

五、Android 公共库
  1. Guava
    Google 的基于 java1.6 的类库集合的扩展项目,包括 collections, caching, primitives support, concurrency libraries, common annotations, string processing, I/O 等等. 这些高质量的 API 可以使你的 JAVa 代码更加优雅,更加简洁
    项目地址:https://code.google.com/p/guava-libraries/
    文档介绍:https://code.google.com/p/guava-libraries/wiki/GuavaExplained

  2. AndroidCommon
    Android 公共库
    项目地址:https://github.com/Trinea/AndroidCommon
    Demo 地址:https://play.google.com/store/apps/details?id=cn.trinea.android.demo
    文档介绍:http://www.trinea.cn/android/android-common-lib/
    包括:a. ImageCache 图片缓存,包含内存和 Sdcard 缓存
    http://www.trinea.cn/android/android-imagecache/
    特点:(1)支持预取新图片,支持等待队列
    (2)包含二级缓存,可自定义文件名保存规则
    (3)可选择多种缓存算法(FIFO、LIFO、LRU、MRU、LFU、MFU 等 13 种)或自定义缓存算法
    (4)可方便的保存及初始化恢复数据
    (5)支持不同类型网络处理
    (6)可根据系统配置初始化缓存等

  3. HttpCache Http 缓存
    文档介绍:http://www.trinea.cn/android/android-http-cache
    特点是:(1) 根据 cache-control、expires 缓存 http 请求
    (2) 支持同步、异步 Http 请求
    (3) 在匿名回调中处理请求结果
    (4) 在 UI 线程外进行 http 请求
    (5) 默认 gzip 压缩
    (2) 公共 View(下拉及底部加载更多 ListView、底部加载更多 ScrollView、滑动一页 Gallery)
    (3) Android 常用工具类(网络、下载、Android 资源操作、shell、文件、Json、随机数、Collection 等等)

  4. DropDownListView 下拉刷新及滑动到底部加载更多 ListView
    文档介绍:http://www.trinea.cn/android/dropdown-to-refresh-and-bottom-load-more-listview/

  5. shipfaster
    整合了 Dagger Otto Retrofit Robolectric Picasso OkHttp,方便快速开发
    项目地址:https://github.com/pyricau/shipfaster

  6. CleanAndroidCode
    整合了 Dagger Otto AndroidAnnotations,方便快速开发
    项目地址:https://github.com/pyricau/CleanAndroidCode

  7. xUtils
    基于 Afinal,包含 DbUtils、ViewUtils、HttpUtils、BitmapUtils 四大模块,可用于快速开发
    项目地址:https://github.com/wyouflf/xUtils
    原理剖析文档:xUtils

  8. Afinal
    Afinal 是一个 android 的 ioc,orm 框架,内置了四大模块功能:FinalAcitivity,FinalBitmap,FinalDb,FinalHttp。通过 finalActivity,我们可以通过注解的方式进行绑定 ui 和事件。通过 finalBitmap,我们可以方便的加载 bitmap 图片,而无需考虑 oom 等问题。通过 finalDB 模块,我们一行代码就可以对 android 的 sqlite 数据库进行增删改查。通过 FinalHttp 模块,我们可以以 ajax 形式请求 http 数据
    项目地址:https://github.com/yangfuhai/afinal
    官网网址:http://www.afinal.org

  9. UltimateAndroid
    UltimateAndroid 是一个快速开发 Android 应用的框架,框架目前主要包含的功能有 View Injection,ORM,异步网络请求和图片加载,自动化脚本测试,磁盘 LRU 等功能.同时提供了类似于 TripleDes、Webview 快速设置、Md5 处理、String 处理,Https 处理等常用工具类,还有超过 100 多种 UI 控件效果。
    项目地址:https://github.com/cymcsg/UltimateAndroid
    官网网址:http://blog.marshalchen.com/UltimateAndroid/

  10. SAF
    SAF(Simple Android Framework)是一个简单的 android 框架,它为开发 Android app 提供了基础性组件。
    项目地址:https://github.com/fengzhizi715/SAF
    官网网址:http://www.salesuite.cn/
    包括:(1)Event Bus(事件总线)
    (2) Rest Client(http 的框架)
    (3) Image Cache(图片缓存)
    (4) Dependency Injection(依赖注入)
    (5) Sqlite ORM(sqlite 的 orm)
    (6) Router(Activity、Fragment 的 Router)
    (7) Utils(各种常用的工具类)

  11. Barber
    Custom View 神器。通过简单的注解帮助你大大减少 Custom View 中的代码量。由于和 ButterKnife 一样使用了 Annotation Proccessor ,所以对程序性能没有影响。
    项目地址:https://github.com/hzsweers/barber

  12. device-year-class
    A library that analyzes an Android device's specifications and calculates which year the device would be considered "high end”.(facebook 开发的检测手机主流配置工具)
    项目地址:https://github.com/facebook/device-year-class

  13. RxAndroid
    对RxJava在Android上的扩展,使得Android上也很容易实现reactive components,简化线程操作,从而写出很漂亮的代码。
    项目地址:https://github.com/ReactiveX/RxAndroid
    文档介绍:给Android 开发者的 RxJava 详解

  14. MultiImageSelector
    一个本地图片选择器,支持图片的单选和多选,直接返回所选图片的路径。
    项目地址:https://github.com/lovetuzitong/MultiImageSelector.git

六、Android 高版本向低版本兼容
  1. Nine Old Androids
    将 Android 3.0(Honeycomb)所有动画 API(ObjectAnimator ValueAnimator 等)兼容到 Android1.0
    项目地址:https://github.com/JakeWharton/NineOldAndroids
    原理剖析文档:Nine Old Androids
    Demo 地址:https://play.google.com/store/apps/details?id=com.jakewharton.nineoldandroids.sample
    文档介绍:http://nineoldandroids.com/

  2. HoloEverywhere
    将 Android 3.0 的 Holo 主题兼容到 Android2.1++
    项目地址:https://github.com/Prototik/HoloEverywhere
    Demo 地址:https://raw.github.com/Prototik/HoloEverywhere/repo/org/holoeverywhere/demo/2.1.0/demo-2.1.0.apk
    文档介绍:http://android-developers.blogspot.com/2012/01/holo-everywhere.html

  3. SherlockNavigationDrawer
    将 Android NavigationDrawer 和 ActionbarSherlock 结合,解决 4.0 以下 NavigationDrawer 的适配问题
    项目地址:https://github.com/tobykurien/SherlockNavigationDrawer
    文档介绍:http://developer.android.com/training/implementing-navigation/nav-drawer.html

  4. Notifications4EveryWhere
    将 Android 4.1 的 Notification 兼容到 Android2.2++
    项目地址:https://github.com/youxiachai/Notifications4EveryWhere

  5. Android Switch Widget Backport
    将 Android Switch 和 SwitchPreference 的兼容到 Android2.1++
    项目地址:https://github.com/BoD/android-switch-backport
    Demo 地址:https://play.google.com/store/apps/details?id=org.jraf.android.backport.switchwidget.sample
    文档介绍:https://github.com/BoD/android-switch-backport#using-the-switch

  6. android-datepicker
    将 Android 4.0 的 datepicker 兼容到 Android2.2++
    项目地址:https://github.com/SimonVT/android-datepicker

  7. Transitions Everywhere
    Android 4.4 的 Transitions API 兼容到 Android 2.2 以上
    项目地址:https://github.com/andkulikov/transitions-everywhere

  8. KShareViewActivityManager
    一个兼容Android 5.0 以下Shared Element Transition (页面间共享元素位移动画)库
    项目地址:https://github.com/kot32go/KShareViewActivityManager
    效果图:http://i8.tietuku.com/aa5726b8302ae711.gif

七、多媒体相关
  1. cocos2d-x
    跨平台的 2d 游戏框架,支持 Android、IOS、Linux、Windows 等众多平台
    项目地址:https://github.com/cocos2d/cocos2d-x
    文档介绍:http://www.cocos2d-x.org/wiki
    官网网址:http://www.cocos2d-x.org/

  2. JustWeEngine
    Android的轻量级游戏框架,能大大缩减编写原生游戏的代码量和难度,仍在持续更新中。
    项目地址: https://github.com/lfkdsk/JustWeEngine
    Demo地址: https://github.com/lfkdsk/EngineDemo

  3. Vitamio
    是一款 Android 与 iOS 平台上的全能多媒体开发框架
    项目地址:https://github.com/yixia/VitamioBundle
    网站介绍:http://www.vitamio.org/docs/
    特点:(1) 全面支持硬件解码与 GPU 渲染
    (2) 能够流畅播放 720P 甚至 1080P 高清 MKV,FLV,MP4,MOV,TS,RMVB 等常见格式的视频
    (3) 在 Android 与 iOS 上跨平台支持 MMS, RTSP, RTMP, HLS(m3u8)等常见的多种视频流媒体协议,包括点播与直播。

  4. VDPlayerSDK
    最容易集成的开源播放器组件,支持直播,支持软硬解切换,支持清晰度切换
    项目地址:https://github.com/SinaVDDeveloper/
    Demo 地址:https://github.com/SinaVDDeveloper/demo
    文档介绍:https://github.com/SinaVDDeveloper/sinavideo_playersdk
    特点:
    (1) 使用自定义控件方式提供播放器UI,不需要视频相关知识,能编写android应用就能使用
    (2) 软硬解切换、点播直播支持
    (3) 解码内核小于4M,更方便集成到非专业视频app中
    (4) 修正一些vitaimio的问题,比如m3u8可以拖动等等

  5. VideoPlayerManager
    帮助实现VideoPlayer控制,使得它更容易使用ListView和recyclerview。它还可以跟踪滚动列表中可见的项。当列表中的新项可见域最大时,该库给出了接口来跟踪它。
    项目地址:https://github.com/danylovolokh/VideoPlayerManager
    文档介绍:https://medium.com/@v.danylo/implementing-video-playback-in-a-scrolled-list-listview-recyclerview-d04bc2148429#.hs5n0geqn

  6. UniversalVideoView
    Android上定义播放器控件,支持自定义控制UI, 全屏播放, 重力感应自动切换横竖屏.
    项目地址:https://github.com/linsea/UniversalVideoView
    Sample Screenshot 1 Sample Screenshot 2

  7. PhotoProcessing
    利用 ndk 处理图片库,支持 Instafix、Ansel、Testino、XPro、Retro、BW、Sepia、Cyano、Georgia、Sahara、HDR、Rotate(旋转)、Flip(翻转)等各种特效
    项目地址:https://github.com/lightbox/PhotoProcessing
    Demo 地址:https://github.com/Trinea/TrineaDownload/blob/master/photo-processing.apk?raw=true

  8. Android StackBlur
    图片模糊效果工具类
    项目地址:https://github.com/kikoso/android-stackblur
    Demo 地址:https://github.com/kikoso/android-stackblur/blob/master/StackBlurDemo/bin/StackBlurDemo.apk?raw=true
    文档介绍:https://github.com/kikoso/android-stackblur#usage

  9. Bitmap Smart Clipping using OpenCV
    图片智能裁剪保留重要部分显示
    项目地址:https://github.com/beartung/tclip-android
    利用淘宝的 http://code.taobao.org/p/tclip/ 库完成
    一淘玩客正在使用的图片裁剪,自动识别图片中的重要区域,并且在图片裁剪时保留重要区域
    特点:(1). 能进行人脸识别。图片中有人脸,将自动视为人脸区域为重要区域,将不会被裁剪掉
    (2).自动其它重要区域。如果图片中未识别出人脸,则会根据特征分布计算出重区域

  10. Cropper
    图片局部剪切工具,可触摸控制选择区域或旋转
    项目地址:https://github.com/edmodo/cropper
    文档介绍:https://github.com/edmodo/cropper/wiki
    效果图:Renderings

  11. uCrop
    Yalantis 出品的强大的图片裁剪库 ,支持缩放,旋转图片,支持各种比例的裁剪框
    项目地址:https://github.com/Yalantis/uCrop
    效果图:Renderings

  12. android-crop
    图片裁剪 Activity 项目地址:https://github.com/jdamcd/android-crop
    效果图:Renderings

  13. TileView
    可分块显示大图,支持 2D 拖动、双击、双指放大、双指捏合
    项目地址:https://github.com/moagrius/TileView
    Demo 地址:http://moagrius.github.io/TileView/TileViewDemo.apk

  14. BlurEffectForAndroidDesign
    图片模糊效果
    项目地址:https://github.com/PomepuyN/BlurEffectForAndroidDesign

  15. android-eye
    PC 端网页查看同一局域网内的手机摄像头内容,可以用来监控哦
    项目地址:https://github.com/Teaonly/android-eye
    Demo 地址:https://play.google.com/store/apps/details?id=teaonly.droideye

  16. libpng for Android
    PNG 图片的 jni 库,支持几乎 png 的所有特性
    项目地址:https://github.com/julienr/libpng-android
    文档介绍:http://www.libpng.org/pub/png/libpng.html

  17. android-gpuimage
    基于 GPU 的图片滤镜
    项目地址:https://github.com/CyberAgent/android-gpuimage

  18. AndroidFaceCropper
    图片脸部自动识别,将识别后的局部图片返回
    项目地址:https://github.com/lafosca/AndroidFaceCropper

  19. Android Video Crop
    利用 TextureView 播放和剪切视频,类似 ImageView.setScaleType
    项目地址:https://github.com/dmytrodanylyk/android-video-crop
    Demo 地址:https://github.com/lafosca/AndroidFaceCropper/releases/download/1.0/FaceCropper-sample-debug-unaligned.apk

  20. svg-android
    Android Svg 矢量图形支持
    项目地址:https://github.com/japgolly/svg-android https://github.com/japgolly/svg-android

  21. Android Visualizer
    从 Android MediaPlayer 获得音频,然后像 iTunes 及 WinAmp 一样展示音轨
    项目地址:https://github.com/felixpalmer/android-visualizer

  22. ExoPlayer
    包括仪表板和 SmoothStreaming 自适应回放,缓存持久化和自定义渲染器,方便自定义和扩展,并且可以通过应用商店更新
    项目地址:https://github.com/google/ExoPlayer

  23. DanmakuFlameMaster
    android 上开源弹幕解析绘制引擎项目
    项目地址:https://github.com/ctiao/DanmakuFlameMaster

  24. OpenDanmaku
    android 上一个轻量级的更简单的开源弹幕控件
    项目地址:https://github.com/linsea/OpenDanmaku

八、事件总线(订阅者模式)

通过发布/订阅事件解耦事件发送和接受,从而简化应用程序组件(Activities, Fragments 及后台线程)之间的通信

  1. EventBus
    greenrobot 的开源项目
    项目地址:https://github.com/greenrobot/EventBus
    原理剖析文档:EventBus
    文档介绍:https://github.com/greenrobot/EventBus#general-usage-and-api
    特点:(1) 支持在不同类型的线程中处理订阅,包括发布所在线程,UI 线程、单一后台线程、异步线程
    (2) 支持事件优先级定义,支持优先级高的订阅者取消事件继续传递,支持粘性事件,是不是跟系统的有序广播、粘性广播很像啊
    (3) 不是基于 annotations
    (4) 性能更优
    (5) 体积小
    (6) 支持单例创建或创建多个对象
    (7) 支持根据事件类型订阅

  2. Otto
    Square 的开源项目,基于 Guava 的 Android 优化
    项目地址:https://github.com/square/otto
    文档介绍:http://square.github.io/otto/
    EventBus 与 Otto 的功能及性能对比文档
    EventBus 与 Otto 性能对比 Demo Apk

九、传感器
  1. Great Android Sensing Toolkit
    Android 感应器工具包,包含示例及使用过程中可能需要的算法
    项目地址:https://github.com/gast-lib/gast-lib
    Demo 地址:https://play.google.com/store/apps/details?id=root.gast.playground
    文档介绍:https://github.com/gast-lib/gast-lib#documentation

  2. SensorManager
    Android 传感器管理
    项目地址:https://github.com/nlathia/SensorManager
    文档介绍:https://docs.google.com/document/d/1TqThJULb-4e6TGb1gdkAaPCfyuXStjJpbnt7a0OZ9OE/edit

  3. GPSLogger
    记录 GPS 信息
    项目地址:https://github.com/mendhak/gpslogger
    Demo 地址:https://play.google.com/store/apps/details?id=com.mendhak.gpslogger
    文档介绍:http://code.mendhak.com/gpslogger/

  4. Pedometer
    计步器,使用硬件计步感应器
    项目地址:https://github.com/j4velin/Pedometer

  5. leapcast
    ChromeCast 模拟器的 App
    项目地址:https://github.com/dz0ny/leapcast

  6. Arduino-Communicator
    与 Arduino 通信的 App
    项目地址:https://github.com/jeppsson/Arduino-Communicator

  7. android-pedometer
    Android 计步器
    项目地址:https://github.com/bagilevi/android-pedometer
    Demo 地址:http://pedometer.googlecode.com/files/Pedometer-1.4.apk

  8. OwnTracks for Android
    自己的轨迹记录
    项目地址:https://github.com/owntracks/android

  9. Shake Detector library for Android
    Android 手机震动摇晃检测库,提供供 UI 线程调用的回调接口
    项目地址:https://github.com/tbouron/ShakeDetector
    Demo 地址:https://play.google.com/store/apps/details?id=com.github.tbouron.shakedetector.example

  10. Android heart rate monitor
    Android 心跳检测
    项目地址:https://github.com/phishman3579/android-heart-rate-monitor

  11. Bluetooth LE Library for Android
    蓝牙源信息,包括宝库 Mac、更新时间、RSSI、UUID、信号源距离、影响范围等信息
    项目地址:https://github.com/alt236/Bluetooth-LE-Library---Android
    Demo 地址:https://play.google.com/store/apps/details?id=uk.co.alt236.btlescan

  12. farebot
    通过 NFC 从公交卡中读取数据的一个应用
    项目地址:https://github.com/codebutler/farebot

十、安全
  1. SQLCipher
    Sqlite 加密工具
    项目地址:https://github.com/sqlcipher/sqlcipher
    文档介绍:http://sqlcipher.net/sqlcipher-for-android/

  2. Conceal
    快速高效的进行文件加密解密
    项目地址:https://github.com/facebook/conceal
    文档介绍:https://github.com/facebook/conceal#usage

  3. Android-PasscodeLock
    应用锁,每次启动或从任何 Activity 启动应用都需要输入四位数字的密码方可进入
    项目地址:https://github.com/wordpress-mobile/Android-PasscodeLock
    Demo 地址:https://play.google.com/store/apps/details?id=org.wordpress.android
    APP 示例:Wordpress Android,支付宝,挖财

  4. GlowPadBackport
    将 Android4.2 的锁屏界面解锁扩展到 Android1.6 及 1.6+
    项目地址:https://github.com/rock3r/GlowPadBackport
    Demo 地址:https://play.google.com/store/apps/details?id=net.sebastianopoggi.samples.ui.GlowPadSample
    效果图:Renderings

  5. GlowPadView
    Android 4 锁屏界面解锁
    项目地址:https://github.com/nadavfima/GlowPadView
    效果图:Renderings

  6. Android-InsecureBank
    关于 Android 不安全性的示例
    项目地址:https://github.com/dineshshetty/Android-InsecureBankv2

十一、插件化

更多见:Android 插件化作用、概念以及不错的资料(包括开源项目)和解决方案

  1. dynamic-load-apk
    Android 动态加载 Apk,热部署,利用 ClassLoader 以及 Activity 代理的方式解决
    项目地址:https://github.com/singwhatiwanna/dynamic-load-apk
    原理剖析文档:dynamic-load-apk
    文档介绍:http://blog.csdn.net/singwhatiwanna/article/details/22597587

  2. Android Dynamic Loader
    点评的实现方式,和上面不同的是:他不是用代理 Activity 的方式实现而是用 Fragment 以及 Schema 的方式实现
    项目地址:https://github.com/mmin18/AndroidDynamicLoader
    Demo 地址:https://github.com/mmin18/AndroidDynamicLoader/raw/master/host.apk

  3. xCombine
    Android App 插件式插件开发,插件必须先安装,更推荐看上面两个开源项目
    项目地址:https://github.com/wyouflf/xCombine
    文档介绍:http://my.oschina.net/u/1171837/blog/155377

  4. Android Plugin Framework
    Android 插件式开发,开放的源码目前不完整
    项目地址:https://github.com/umeng/apf

  5. Android OpenAtlas
    Android插件框架,基于OSGI,非代理方式,组件需要在宿主中声明
    项目地址:https://github.com/bunnyblue/OpenAtlas
    Demo 地址:https://github.com/bunnyblue/OpenAtlasExtension/blob/master/Dist/OpenAtlasLauncher.apk

  6. multidex
    安装多 dex 的 classloader
    项目地址:https://github.com/casidiablo/multidex

  7. ANR-WatchDog
    Android ANR 监听,通过监听自己的 UI Thread 是否被执行确定是否发生了 ANR,并可以设置相关事件
    项目地址:https://github.com/SalomonBrys/ANR-WatchDog

十二、文件

对不同文档类型的处理,包括 PDF、Word、EPub、Html、Zip 等

  1. purePDF
    允许从任何运行的 SWF 文件读取和创建 PDF 文档
    项目地址:https://github.com/sephiroth74/purePDF

  2. android-pdfview
    快速解析 pdf 的 view,默认支持手势缩放和相关动画
    项目地址:https://github.com/JoanZapata/android-pdfview

  3. Office 365 SDK for Android Preview
    可支持 Microsoft SharePoint Lists, Microsoft SharePoint Files, Microsoft Exchange Calendar, Microsoft Exchange Contacts, Microsoft Exchange Mail
    项目地址:https://github.com/OfficeDev/Office-365-SDK-for-Android

  4. OpenSpritz-Android
    EPub 阅读器
    项目地址:https://github.com/OnlyInAmerica/OpenSpritz-Android

  5. jsoup
    一个解析 html 的 java 库,可方便的提取和操作数据
    项目地址:https://github.com/jhy/jsoup
    官网网址:http://jsoup.org/
    作用:(1) 从一个 url、文件或 string 获得 html 并解析
    (2) 利用 dom 遍历或 css 选择器查找、提取数据
    (3) 操作 html 元素
    (4) 根据白名单去除用于提交的非法数据防止 xss 攻击
    (5) 输出整齐的 html

  6. ZIP
    java 压缩和解压库
    项目地址:https://github.com/zeroturnaround/zt-zip
    文档介绍:https://github.com/zeroturnaround/zt-zip#examples
    作用:(1) 解压和压缩,并支持文件夹内递归操作
    (2) 支持包含和排除某些元素
    (3) 支持重命名元素
    (4) 支持遍历 zip 包内容
    (5) 比较两个 zip 包等功能

  7. Image File Selector
    轻量级的图片文件选择器,用系统api选取,压缩和裁切图片,可以方便的得要指定尺寸的图片
    项目地址:https://github.com/sw926/ImageFileSelector

十三、其他
  1. FragmentStack
    一个封装了启动模式的Fragment便捷使用库,方便构建单Activity+多Fragment轻量级框架
    项目地址:https://github.com/Mr-wangyong/FragmentStack
    效果图:https://github.com/Mr-wangyong/FragmentStack/blob/master/play.gif
    App示例:南瓜电影

  2. CustomTabsHelper 快速集成 CustomTabs 的工具类
    项目地址:https://github.com/DreaminginCodeZH/CustomTabsHelper

  3. Salvage view
    带 View 缓存的 Viewpager PagerAdapter,很方便使用
    项目地址:https://github.com/JakeWharton/salvage

  4. Android Priority Job Queue
    Android 后台任务队列
    项目地址:https://github.com/path/android-priority-jobqueue
    文档介绍:https://github.com/path/android-priority-jobqueue#getting-started

  5. Cobub Razor
    开源的 mobile 行为分析系统,包括 web 端、android 端,支持 ios 和 window phone
    项目地址:https://github.com/cobub/razor
    Demo 地址:http://demo.cobub.com/razor
    官网网址:http://dev.cobub.com/

  6. Countly
    Android 移动端数据采集分析系统
    项目地址:https://github.com/Countly/countly-sdk-android
    官网网址:https://count.ly/

  7. aFileChooser
    文件选择器,可内嵌到程序中,而无需使用系统或三方文件选择器。
    项目地址:https://github.com/iPaulPro/aFileChooser

  8. androidpn
    基于 xmpp 协议的消息推送解决方案,包括服务器端和 android 端。
    项目地址:https://github.com/dannytiehui/androidpn

  9. Bolts
    Android 的异步编程模式
    项目地址:https://github.com/BoltsFramework/Bolts-Android/
    与 AsyncTask 比较:(1) 使用的是无大小限制的线程池
    (2) 任务可组合可级联,防止了代码耦合

  10. CastCompanionLibrary-android
    使 Android 程序中更快的接入 Google Cast
    项目地址:https://github.com/googlecast/CastCompanionLibrary-android
    文档介绍:https://developers.google.com/cast/

  11. CastVideos-android
    从 Android 设备分享 Video 通过 Google Cast
    项目地址:https://github.com/googlecast/CastVideos-android
    文档介绍:https://developers.google.com/cast/

  12. Uninstall_Statics
    Android 应用自身被卸载监听及打开浏览器等反馈功能实现
    项目地址:https://github.com/sevenler/Uninstall_Statics
    文档介绍:http://www.cnblogs.com/zealotrouge/p/3157126.html http://www.cnblogs.com/zealotrouge/p/3159772.html

  13. Memento
    保证在系统配置改变时,Activity 中的某些数据可以简单安全的保持不变
    项目地址:https://github.com/mttkay/memento
    文档介绍:https://github.com/mttkay/memento#usage

  14. FreeFlow
    布局引擎,更简单的创建自定义布局,并且当数据和布局改变时更美观的过渡动画
    项目地址:https://github.com/Comcast/FreeFlow
    Demo 地址:https://github.com/Comcast/FreeFlow/releases

  15. Android Gesture Detectors Framework
    Android 手势框架,支持双指旋转、移动、平移、缩放等
    项目地址:https://github.com/Almeros/android-gesture-detectors

  16. Mapbox Android SDK
    Android Map 的替代版
    项目地址:https://github.com/mapbox/mapbox-android-sdk

  17. Activity animation
    Activity 跳转动画,支持各个方向波浪的效果
    项目地址:https://github.com/flavienlaurent/activityanimation
    在线演示:https://www.youtube.com/watch?v=-E0sc6w_Jck

  18. KryoNet
    通过 NIO 提供客户端和服务器端 TCP/UDP 网络传输的 Java 库
    项目地址:https://github.com/EsotericSoftware/kryonet

  19. Rebound
    一个模仿弹簧反弹的 Java 库,可用于创建动画
    项目地址:https://github.com/facebook/rebound

  20. Android Social Networks
    社交网络接入统一管理器,可方便的从 Twitter, LinkedIn, Facebook, Google Plus 登陆、获得个人信息、发送消息、发送专篇、添加或删除好友
    项目地址:https://github.com/antonkrasov/AndroidSocialNetworks
    Demo 地址:https://play.google.com/store/apps/details?id=com.github.androidsocialnetworks.apidemos

  21. SmartAppUpdates
    Android App 增量升级,包含前后端方案、Demo、以及 so 库,可用于商店或大体积 App 差分升级
    项目地址:https://github.com/cundong/SmartAppUpdates

  22. Magnet
    创建类似 Facebook 聊天桌面悬浮窗的效果
    项目地址:https://github.com/premnirmal/Magnet

  23. AcDisplay
    将 Android 的通知都集中到锁屏显示
    项目地址:https://github.com/AChep/AcDisplay
    Demo 地址:https://play.google.com/store/apps/details?id=com.achep.acdisplay

  24. QrCodeScan
    ZXing 和 ZBar 结合的二维码扫描项目,提高了扫描效率
    项目地址:https://github.com/SkillCollege/QrCodeScan
    效果图:Renderings

  25. Android-ScreenShot
    实现 android 系统截屏功能
    项目地址:https://github.com/Android-ScreenShot/AndroidScreenShotService
    文档介绍:http://blog.csdn.net/buptgshengod/article/details/39155979

  26. card.io SDK for Android
    信用卡扫描 Android SDK
    项目地址:https://github.com/card-io/card.io-Android-SDK
    Demo 项目:https://github.com/card-io/card.io-Android-SDK/tree/master/SampleApp

  27. ASNE
    Twitter, Facebook, Google Plus, LinkedIn, Instagram, Vkontakte, Odnoklassniki 的集成库,包括他们的大多数功能
    项目地址:https://github.com/gorbin/ASNE
    Demo 地址:https://play.google.com/store/apps/details?id=com.gorbin.androidsocialnetworksextended.asne

  28. Android Signature Pad
    Android 自定义的签名 View,可自定义笔颜色和大小
    项目地址:https://github.com/gcacace/android-signaturepad
    Demo 项目:https://github.com/gcacace/android-signaturepad/tree/master/SignaturePad-Example

  29. Teleport
    Android Wear 数据同步和消息传送库
    项目地址:https://github.com/Mariuxtheone/Teleport

  30. DebugLog
    可以帮你创建更简单和更容易理解的调试日志,能够友好的显示调试信息所在类和函数。
    项目地址:https://github.com/MustafaFerhan/DebugLog
    效果图:Renderings

  31. Logger
    简单、美观而且十分强大的 Android 日志工具
    项目地址:https://github.com/orhanobut/logger
    Demo 地址:https://github.com/orhanobut/logger/tree/master/app
    效果图:Renderings

  32. jlog
    可以灵活配置的日志工具,支持JSON打印,日志保存到指定文件,日志显示调用位置(混淆模式下依然有效)
    项目地址:https://github.com/JiongBull/jlog
    Demo 地址:apk地址
    效果图:Renderings

  33. Phrase
    square 组开源大牛写的字符串替换类
    项目地址:https://github.com/square/phrase

  34. ColorPhrase
    模仿 phrase 写的对字符串个别字符颜色改变的类,高效强大!
    项目地址:https://github.com/THEONE10211024/ColorPhrase
    效果图:Renderings

  35. PinyinSearch
    一个为 T9 搜索和 Qwerty 搜索,提供数据解析与匹配等方法的拼音搜索 java 库。
    项目地址: https://github.com/handsomezhou/PinyinSearchLibrary
    Demo 地址: ContactsSearch AppSearch
    效果图:Renderings
    APP 示例: 通讯录应用,微信电话本

  36. PrainView
    PaintView 是一个画图工具:
    可直接使用设定按钮来实现已拥有的方法,且拓展性强
    基础功能:更换颜色、更换橡皮、以及更换橡皮和笔的粗细、清屏、倒入图片
    特殊功能:保存画笔轨迹帧动画、帧动画导入导出、ReDo和UnDo
    项目地址:Paintview
    效果图:p1
    p2
    demo地址:apk地址
    原理解析:PaintView 绘图控件解析

  37. CodeView
    CodeView代码查看/修改工具: 基于WebView制作的代码编辑器,实现代码高亮,暗色主题
    项目地址:CodeView
    效果图:p3
    p4
    demo地址:apk地址

  38. ExplorerView
    文件浏览器:继承自ListView,可拓展性强,可进行文件类型分析
    项目地址:CodeView
    效果图:p5
    p6
    demo地址:apk地址

  39. ReadView
    小说阅读器,支持文字字体、颜色、背景、进度等多种调整,支持一键设置。
    项目地址:ReadView
    效果图:p7
    demo地址:apk地址

  40. MarkDownView
    支持MarkDown语法的渲染器,基于WebView的MarkDown渲染器,支持标准化的MarkDown语法, 调用接口和CodeView保持一致使用简便
    项目地址:ReadView
    效果图:markdown
    demo地址:apk地址

  41. VerTextView竖行排版的TextView:
    支持竖行排版,添加了下划线功能,开启简便,下划线粗细、颜色、间距均可自定义,
    接口调用方式与TextView相似,使用简便。
    项目地址:ReadView
    效果图:vertextview
    demo地址:apk地址

  42. GHDownload下载框架
    支持单线程和多线程断点下载,简单易用。
    项目地址:GHDownload



  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值