github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

kaeppler / droid-fu

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 29
    • 3
  • Source
  • Commits
  • Network (3)
  • Issues (2)
  • Downloads (1)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (5)
    • gh-pages
    • google-mapmaker-cache
    • master ✓
    • maven-support
    • notifications
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

A utility library for your daily Android needs — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

depend on Signpost 1.2 
kaeppler (author)
Fri Jan 29 10:16:20 -0800 2010
commit  4e11109604c55a94fc32b585c31aae7ae9cea046
tree    a695bdb9fd0808d128e007e3598fc5d67954968a
parent  f20304d8977502e1f895253c9c966adad4d6c7f7
droid-fu /
name age
history
message
file .classpath Sun Nov 08 07:42:41 -0800 2009 add pom.xml, change directory structure to defa... [kaeppler]
file .gitignore Wed Dec 23 05:16:53 -0800 2009 fix ignore pattern [kaeppler]
file .project Sun Nov 08 07:42:41 -0800 2009 add pom.xml, change directory structure to defa... [kaeppler]
directory .settings/ Wed Dec 23 07:18:20 -0800 2009 add licensing information to all source files a... [kaeppler]
file AndroidManifest.xml Sun Nov 08 07:48:40 -0800 2009 sanitize manifest file [kaeppler]
file LICENSE.txt Wed Dec 23 07:18:20 -0800 2009 add licensing information to all source files a... [kaeppler]
file README.markdown Thu Dec 24 08:31:49 -0800 2009 add link to JavaDocs [kaeppler]
file default.properties Fri Nov 06 12:22:02 -0800 2009 initial commit [kaeppler]
file pom.xml Fri Jan 29 10:16:20 -0800 2010 depend on Signpost 1.2 [kaeppler]
directory res/ Fri Nov 06 12:22:02 -0800 2009 initial commit [kaeppler]
directory src/ Fri Jan 29 10:16:20 -0800 2010 depend on Signpost 1.2 [kaeppler]
README.markdown

Just looking for the API docs?

You can find them here.


Droid-Fu - for your Android needs

Droid-Fu is an open-source effort aiming to collect and bundle solutions to common concerns in the development of applications for the Google Android platform. Currently it mostly contains code which I pulled out of Qype Radar, and which I believe may prove useful to other developers. This is very much a work-in-progress, and both content and APIs are still in flux. There is not much documentation (yet), and I intend to change that. For now, you may want to read all related articles on my weblog. You can also find me on Twitter.

What does it offer?

Droid-Fu offers both support classes meant to be used alongside existing Android code, as well as self-contained, ready-to-be-used components like new adapters and widgets.

The areas tackled by Droid-Fu include:

  • application life-cycle helpers
  • support classes for handling Intents and diagnostics
  • better support for background tasks
  • super-easy and robust HTTP messaging
  • (remote) image handling and caching
  • custom adapters and views

I suggest you read this introductory article, and anything that follows.

How do I install it?

Droid-Fu is deployed as a JAR. Just drop it in your app's lib folder and add it to the classpath.

Getting the JAR

You can get the Droid-Fu JAR in several ways.

The easiest one is probably to download a pre-built version from GitHub. Just know that these builds may not contain the most recent changes you see in the master branch.

If you want to stay on the bleeding edge, you must download the sources and roll the JAR yourself. It's a little elaborate, but don't run off scared. Just follow these steps and you'll be fine. Droid-Fu employs a managed build process, driven by the wonderful Maven build system system. This means you have to install both Maven (v2.2.1 or newer), and the maven-android SDK deployer. Droid-Fu is currently built against the Android 1.5 R3 APIs, so you must have the proper Android JAR installed, too. Consult the Android SDK docs to learn about how to download and install different Android platform versions using the AVD/SDK Manager bundled with the ADT.

Step 1: Getting the source codes

If you're using git, do a

git clone git://github.com/kaeppler/droid-fu.git

and

git clone git://github.com/mosabua/maven-android-sdk-deployer.git

now.

Alternatively, you can simply download the archived source codes from the master branches, here and here.

Step 2: Install the Android JAR to your local Maven repository

Droid-Fu must be compiled against the Android 1.5 R3 JAR. Since the build is driven by Maven, we must provide the Android JAR to Maven during the compile stage, otherwise the build will fail. Change to the folder to which you downloaded the maven-android SDK deployer source code, and into the platforms/android-1.5 sub-directory, e.g.:

$ cd ~/projects/maven-android-sdk-deployer/platforms/android-1.5

Then install the Android JAR:

$ mvn install -Dandroid.sdk.path=/path/to/your/android/sdk/root

If the build fails, you probably provided a wrong SDK root. An ls in the android.sdk.path should list (among other files) a platforms and add-ons folder.

Step 3: Build and install the Droid-Fu JAR

If you just want to build the JAR, and copy it around manually, change to the folder where you downloaded/cloned the Droid-Fu sources, and run:

$ mvn package

This will build the JAR and place it under the target directory. To make your life easier, I included a switch which lets you deploy the JAR directly to your application's lib folder:

$ mvn install -DcopyTo=/path/to/your/apps/lib/folder

This will build the JAR and copy it to the given folder.

If you want a JavaDoc JAR to get inline docs in Eclipse, do this:

$ mvn javadoc:jar

This will create a JavaDoc JAR under target.

How do I use it?

  1. Link the JAR to your application's classpath, as you would with any other JAR in any other Java or Android project.

  2. If you haven't yet created an Application class for your app, create a new class and let it inherit from com.github.droidfu.DroidFuApplication. Otherwise, just alter your app class to include said inheritance relation.

  3. If you had to create a new app class in the previous step, modify your AndroidManifest.xml and change the application element so that its android:name attribute points to the name of the new class, e.g.:

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android" ...>
        <application android:name="MyApplication" ...>
            ...
        </application>
        ...
    </manifest>
    

How is it licensed?

Droid-Fu is free and open source and may be used under the terms of the Apache License, Version 2.0.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server