public class

LocationProvider

extends Object
java.lang.Object
   ↳ com.usebutton.sdk.util.LocationProvider

Class Overview

Convenience class that will check all available (taking available permissions into account) for the newest location. Provided to quickly provide e.g. transportation to/from the user's location for use in creating a ButtonContext for prepareForDisplay(com.usebutton.sdk.ButtonContext, ButtonDropin.Listener) or willDisplayButton(String, com.usebutton.sdk.ButtonContext, ButtonDropin.Listener). Requires that either ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION is available in this app's AndroidManifest.xml.

Summary

Public Constructors
LocationProvider(Context context)
Public Methods
Location getBestLocation()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public LocationProvider (Context context)

Public Methods

public Location getBestLocation ()