Show Menu
TOPICS×

Android SDK

Create Android Apps powered by Livefyre.
Use this library to integrate Livefyre services into your native Android app. The Livefyre StreamHub Android SDK provides a thin layer around our common API mechanisms, based on the Gradle/Android Studio development environment.
Livefyre also provides a Reviews sample App, based on this SDK.
This Livefyre Android SDK can be used in both Eclipse and Android Studio.
Before installing the Livefyre Android SDK you must have the Android SDK installed on your environment. You must also include some additional Android SDK packages, as described in the Android Developer docs > . Adding SDK Packages
Use the Android SDK Manager (available from the Android Studio or Eclipse toolbar) to install all recommended packages. Be certain to also include the Android Support Repository.

Eclipse

To add the Livefyre Android SDK to your project in Eclipse:
  1. Get the latest StreamHub-Android-SDK from GitHub.
  2. Start with an existing project or create a new one.
  3. To import the StreamHub-Android-SDK into your workspace go to
    File > Import > General > Existing Project into Workspace
    .
  4. Browse and select the StreamHub-Android-SDK; it should now show in the package explorer.
  5. Right click on your project and select
    Properties,
    then the Android tab.
  6. Under the Library section, select
    Add button,
    then select StreamHub-Android-SDK from the list of libraries.
  7. Click on
    Apply
    and
    OK
    .

Android Studio

To add the Livefyre Android SDK to your project in Android Studio:
  1. Get the latest StreamHub-Android-SDK from GitHub.
  2. Start with an existing project or create a new one.
  3. Right click on your project and select
    Open Module Settings
    .
  4. Select the
    +
    button in the top left corner of the window.
  5. Select
    Import Existing Project.
    (In new version of Android studio, you can find
    Import Existing Project
    under
    More Modules
    .)
  6. Browse and select the StreamHub-Android-SDK.
Android Studio may request that you convert the SDK to gradle version; if this occurs, select
next
then
finish
.
Go to
project folder > app folder > build.gradle
file under dependencies to add the the following dependency:
dependencies { compile project(':streamHubAndroidSDK') }
Make sure that the following line is in your
project folder > settings.gradle
file:
include ':streamHubAndroidSDK'
You can customize configurations from within Config.java.

Clients

The StreamHub Android SDK exposes several client classes that can be used to request Livefyre API endpoints:
  • AdminClient
    Exchange a user authentication token for user information, keys, and other metadata.
  • BootstrapClient
    Get recent content and metadata about a particular Collection.
  • StreamClient
    Poll a stream for a Collection to retrieve new, updated, and deleted content.
  • WriteClient
    Post, flag, and like content in a Collection.