I suggest to read this guide for an overview, then study the sample apps to see DroidParts in action.
git clone https://github.com/droidparts/droidparts.git
and you'll see:
- droidparts - the library.
- droidparts-support - :doc:`support`.
- droidparts-samples - sample apps:
DroidPartsGram
- a better Instagram alternative. (:droidparts-sample
- an older fragment-free app.
- droidparts-test - unit tests.
There are several options:
- Download the latest droidparts-x.y.z.jar and put it to the
libs
folder. - Specify as a Gradle dependency:
dependencies {
compile 'org.droidparts:droidparts:${version.from.jar.above}'
// needed if using Android Support library
compile 'org.droidparts:droidparts-support:${version.from.jar.above}'
}
Optional dependencies:
- Android Support library - if using classes in
*.support.*
packages (part of droidparts-support). Also required byImageFetcher
for in-memory cache to work on pre-3.0 Androids. - Apache HttpMime required by
RESTClient
if POSTing multipart files on pre-3.0 Androids.
Even though DroidParts can be used as a set of libraries, it's full pontential is revealed in framework mode.
For that you'll need to subclass:
AbstractDBOpenHelper
for ORM.AbstractDependencyProvider
and specify the subclass in AndroidManifest.xml: :doc:`di`.AbstractApplication
(optional).
:doc:`log` is also configurable via AndroidManifest.xml.
If using ProGuard, remember to include proguard-droidparts.cfg:
proguard.config=${sdk.dir}/tools/proguard/proguard-android-optimize.txt:../droidparts/proguard-droidparts.cfg