Xively Android library (BETA)
Please note that this library is still in beta.
This is an Android remote (AIDL) service for accessing Xively API asynchronously.
The implementation can be found under
An example of the consumer of this service can be found under
It uses Android's
URLConnection for handling HTTP requests and have no external dependencies.
It is deliberately designed to be very lightweight. For a fully featured HTTP client library, check out our Java library.
It currently supports API9 (Gingerbread) to API17 (Jelly Bean).
This library is Open Source, under the BSD 3-Clause.
Copyright © 2003-2013 LogMeIn, Inc. All rights reserved.
LICENSE.md for full text of the license.
You will need to set your API key and feed ID in these files:
Configuring Android Service Consumer
The consumer of this service will be able to access Xively API via all methods defined in the
As seen from the demo project, the following files must be present in the consumer as per AIDL service specified by Android:
com.xively.android.service.Response.java com.xively.android.service.IHttpService.aidl com.xively.android.service.Response.aidl
The name of the intent this service listens to is
com.xively.android.service.HttpService, as per the
<service android:name="com.xively.android.service.HttpService" > <intent-filter> <action android:name="com.xively.android.service.HttpService" /> </intent-filter> </service>
Multiple client apps can connect to this service if the include the above snippet on
RESTful requests to Xively API are managed by
HttpService when invoked by an intent.
The service uses
AsyncTask to make the request.
The response is expected to return from
AsyncTask within the time as specified in
An exception will be thrown otherwise.
All exception thrown out of this library is
RemoteException, as prescribed by AIDL specification.
For compatibility with Android version before API15, any caught exception in this service will be returned as a response with its status that represents an exception condition (
The response from the service can be retrieved as string:
which the client can then easily turned into a