Skip to content

Latest commit

 

History

History
68 lines (45 loc) · 2 KB

getting_started.rst

File metadata and controls

68 lines (45 loc) · 2 KB

Getting Started

I suggest to read this guide for an overview, then study the sample apps to see DroidParts in action.

Repository Structure

git clone https://github.com/droidparts/droidparts.git

and you'll see:

  1. droidparts - the library.
  2. droidparts-support - :doc:`support`.
  3. droidparts-samples - sample apps:
    • DroidPartsGram - a better Instagram alternative. (:
    • droidparts-sample - an older fragment-free app.
  4. droidparts-test - unit tests.

Integration

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}'
}

Dependencies

Optional dependencies:

  • Android Support library - if using classes in *.support.* packages (part of droidparts-support). Also required by ImageFetcher 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.

Configuration

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.

ProGuard

If using ProGuard, remember to include proguard-droidparts.cfg:

proguard.config=${sdk.dir}/tools/proguard/proguard-android-optimize.txt:../droidparts/proguard-droidparts.cfg