Skip to content

Instantly share code, notes, and snippets.

@haxorgist
Created November 28, 2018 00:10
Show Gist options
  • Select an option

  • Save haxorgist/513c855a7edf0e92008e70fc12286428 to your computer and use it in GitHub Desktop.

Select an option

Save haxorgist/513c855a7edf0e92008e70fc12286428 to your computer and use it in GitHub Desktop.
package com.example.www.pokedex;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import com.algolia.instantsearch.helpers.InstantSearch;
import com.algolia.instantsearch.helpers.Searcher;
import com.algolia.search.saas.Client;
import com.algolia.search.saas.Index;
public class MainActivity extends AppCompatActivity {
Searcher searcher;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
searcher = Searcher.create(ALGOLIA_APP_ID, ALGOLIA_SEARCH_API_KEY, ALGOLIA_INDEX_NAME)
InstantSearch helper = new InstantSearch(this, searcher);
helper.search();
}
@Override
protected void onDestroy() {
searcher.destroy();
super.onDestroy();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment