This SDK should provide you with all you'll need to start developing cloud-connected apps with the FeedHenry platform. The SDK provides access to cloud action calls, app authentication and authorization.
- Java 7
- Maven 3.1.1
- Latest Android SDK and Platform version
- Latest Maven Android SDK Deployer
- Set
ANDROID_HOME
environment variable
This library is built as an aar project using Maven, but Google does not ship all the required libraries to Maven Central. You must locally deploy them using the maven-android-sdk-deployer.
Run the following commands outside the FeedHenry Android SDK directory to avoid polluting the repo:
git clone git://github.com/mosabua/maven-android-sdk-deployer.git
cd $PWD/maven-android-sdk-deployer/platforms/android-23
mvn install -N --quiet
cd -
cd $PWD/maven-android-sdk-deployer/repositories/google-m2repository
mvn install -N --quiet
Now let's build the library.
In the base repo directory:
cd $PWD/fh-android-sdk
mvn clean package
This will compile the source code, generating an aar and a jar file in the target directory.
Until we don't have it released in Maven Central we are hosting it in a Github repo
To deploy it, you need to follow the instructions below:
mvn -DaltDeploymentRepository=snapshot-repo::default::file:[your repo dir]/snapshots clean deploy
mvn -DaltDeploymentRepository=releases-repo::default::file:[your repo dir]/releases clean deploy
After that, commit it in the fh-android-sdk-repository and send a PR on it
Add our Github host repo in your gradle.build
project file
allprojects {
repositories {
jcenter()
// for snapshots
maven { url "https://github.com/feedhenry/fh-android-sdk-repository/raw/master/snapshots" }
// for released
maven { url "https://github.com/feedhenry/fh-android-sdk-repository/raw/master/releases" }
}
}
Add the FH Android aar
library in your build.gradle
project
dependencies {
compile 'com.feedhenry:fh-android-sdk:3.0.0'
}
For more detail about our API, See FH Android SDK Guide.
To use the Android SDK in Ant-based Android projects, the following files need to be added as the dependencies:
- The fh-android-sdk jar file (e.g. 3.0.0 Jar File)
- All the jar files in the deps directory
The example directory contains an example to demonstrate how to use all the Android native APIs. You can import it into Eclipse and run it on an emulator or device.
If building in Android Studio, you will need to manually add the jar as a library, as well as the Android Asynchronous Http Client.