The endless.solr project simplifies the integration of Apache Solr data into Android applications. It provides a data provider for the endless list library which accesses an Apache Solr server.

A common use case is the search for a specific entry in the Apache Solr index. The user enters a search string and gets a list of hits. endless.solr helps the developer and minimizes the development effort to achieve this.


	private static final String SERVER_URL = "http://android-rpgnextgen.rhcloud.com/solr";
	private static final String CACHE_DATA_PROVIDER = "cache.data.provider"; 

	private SolrDataProvider dataProvider;
	protected void onCreate(Bundle savedInstanceState) {

		SolrEntryViewProvider entryViewProvider = new SolrEntryViewProvider(getBaseContext(), "name", R.id.entry);
		GenericArrayAdapter adapter = new GenericArrayAdapter(this, entryViewProvider);
		adapter.setErrorHandler(new DataProviderErrorHandler(this, 
		                "There was a problem getting the data from " + SERVER_URL + "."));
		if (savedInstanceState == null) {
		    dataProvider = new SolrDataProvider(SERVER_URL, "type:country");
		    // to display the first block of entries on startup
		    // go and fetch the first block of entries here
		    adapter.new QueryTask().execute();
		else {
		    dataProvider = savedInstanceState.getParcelable(CACHE_DATA_PROVIDER);

	protected void onSaveInstanceState(Bundle outState) {
	    if (dataProvider != null) {
	        outState.putParcelable(CACHE_DATA_PROVIDER, dataProvider);


This Android library works from API level 11 upwards (Android 3.x) and requires the endless list library.


This software is released under the BSD 2-Clause License.


A demo APK showing endless list solr examples can be found in the projects files section. The permission INTERNET is needed to run the demo because the Solr example needs network access to the remote Solr server instance.

Source Code

The source code can be fetched from Sourceforge.net with the following command

hg clone http://hg.code.sf.net/p/andless/endless.solr endless.solr