Android Library

Aisle411 Android Sample Application

The Aisle411 Android Sample Application provides an application that works out of the box using various SDKs developed by Aisle411. The sample comes pre-loaded with Indoor Mapping, Single Product Search, and Shopping List Search functionalities. Using your partner id and partner secret that you obtain from Aisle411, you will be able to embed these technologies into your application. Below you will find brief documentation and descriptions for the functionalities provided in the sample app, as well as all of the knowledge that you will need to modify them to best fit your needs. If you would like to dig deeper into the core functionalities of the technology, more explicit and comprehensive documentation of our entire suite of SDKs can be found here.

Installation

Android Studio

Android Studio will be doing most of the heavy lifting in terms of installation, so the first thing that you need to do is to download Android Studio!

Once you have Android Studio installed, you should download the Sample Application project files. You can then unzip the project and open it using Android Studio.

At this point, you may have some dependencies to install, tools to update, and the like. Android Studio should prompt you at each step to make whatever changes or updates are necessary to get the project to run on your machine.

Finally, you will need a device to run the application on! You can create a virtual device in Android Studio, or connect an Android device to your machine. Once you have your device connected, press "Run" with your preferred device selected, and give the application a go!

The next section describes portions of the Sample Application that were designed with simple modifications in mind. These sections should be fairly straightforward to interact with and bend towards your individual needs. Further modification of the application can be done by modifying ExploreVenueActivity.java, FeatureListActivity.java, and MapFragment.java. You can read up on the component pieces of these classes on the main documentation page for our Android SDKs.

Simple Modifications

SampleProduct Class

SampleProduct.java is the base for the provided wrapper around item results returned by single product and shopping list searches. These entities are easier to work with, and able to be modified for your own needs.

  • Constructor Methods
    • SampleProduct(String name, int id, String rss)
    • SampleProduct(String name, int id, String rss, boolean isChecked)
  • Getter Methods
    • public String getName()
    • public int getId()
    • public String getRss()
  • Equality Testing
    • public boolean equals(Object o) - based on id comparison

SampleProducts Class

SampleProducts.java is essentially a easy way to define shopping lists, and ways through which to navigate them. The provided implementation is pretty bare, but there are many possibilities that could be acted upon to further your individual needs.

  • Provides a list of sample products, defined in-file.
  • public getDefaultShoppingList() - builds the “default” shopping list using a subset of the list of products described above. This list will one the one used in the shopping list search in the sample application.
  • public SampleProduct findByName(String name) - returns a SampleProduct in the products list if one matches the name parameter
  • public SampleProduct findById(int id) - returns a SampleProduct in the products list if one matches the id parameter

SampleInformationBar Class

SampleInformationBar.java is the base for the provided overlays on item selections.

  • Constructor Method
    • SampleInformationBar(Context context, ProductsAdapter adapter)
  • public void setFixed(boolean fixed) - sets the isFixed value of the bar to true or false
  • public boolean isFixed(ItemizedOverlay<ProductOverlayItem> itemizedOverlay, ProductOverlayItem productOverlayItem) - returns the isFixed value of the bar, either true or false
  • public CharSequence getExpandInstructions(ItemizedOverlay<ProductOverlayItem> itemizedOverlay, ProductOverlayItem productOverlayItem)
    • Returns information bar expand instructions
  • public CharSequence getCollapseInstructions(ItemizedOverlay<ProductOverlayItem> itemizedOverlay, ProductOverlayItem productOverlayItem)
    • Returns information bar collapse instructions
  • public CharSequence getSublocation(ItemizedOverlay<ProductOverlayItem> itemizedOverlay, ProductOverlayItem productOverlayItem)
    • Returns sublocation string
  • public CharSequence getLocation(ItemizedOverlay<ProductOverlayItem> itemizedOverlay, ProductOverlayItem productOverlayItem)
    • Returns section + aisle string
  • public CharSequence getKeyword(ItemizedOverlay<ProductOverlayItem> itemizedOverlay, ProductOverlayItem productOverlayItem)
    • Returns keyword string