Download Android example (Eclipse project)

This application has been written to demonstrate the basics of accessing the service via an Android phone. It has been developed using the Free Java SDK and Eclipse plugins which you can download here.


It had been developed using Android 4 and is back compatible with version  2.3 or newer. It has been tested using an emulator and deployed to a real phone (running 2.3.3).


The user inputs a postcode to find his OA or PC (currently set to Parliamentary Constituency). This is actually a call to NeSS Data Exchange as the function is not available in the OpenAPI Beta. Then pick a dataset, then view a table of data.


screen shot of Android demo showing simple census table


The demo concentrates on the essentials for using the API. For a whizzier demo it could get the postcode of the current area using the phone's location (GPS or Wi-Fi). It could also use a charting tool instead of a simple table.


To access the web service inside the emulator through a network proxy you will need to uncomment the proxy server connection lines and update them with the details of your proxy server.


The demo parses the XML response using a combination of XPath and DOM commands to illustrate the Java code for both methods.