@UiThread
public final class TrimbleMaps
extends java.lang.Object
Obtain a reference by calling getInstance(Context)
. Usually this class
is configured in
Application#onCreate() and is responsible for the active access token, application context, and
connectivity state.
Modifier and Type | Method | Description |
---|---|---|
static android.content.Context |
getApplicationContext() |
Application context
|
static TrimbleMaps |
getInstance(android.content.Context context) |
Get an instance of TrimbleMaps.
|
static TrimbleMaps |
getInstance(android.content.Context context,
com.trimblemaps.account.models.TrimbleMapsAccount account) |
|
static ModuleProvider |
getModuleProvider() |
Get the module provider
|
static java.lang.String |
getRegion() |
|
static boolean |
hasInstance() |
Internal use.
|
static java.lang.Boolean |
isConnected() |
Determines whether we have an internet connection available.
|
static void |
setConnected(java.lang.Boolean connected) |
Manually sets the connectivity state of the app.
|
@UiThread @NonNull public static TrimbleMaps getInstance(@NonNull android.content.Context context)
This class manages the TrimbleMaps access token, application context, and connectivity state.
context
- Android context which holds or is an application context@UiThread @NonNull public static TrimbleMaps getInstance(@NonNull android.content.Context context, @NonNull com.trimblemaps.account.models.TrimbleMapsAccount account)
@Nullable public static java.lang.String getRegion()
@NonNull public static android.content.Context getApplicationContext()
public static void setConnected(java.lang.Boolean connected)
connected
- flag to determine the connectivity state, true for connected, false for
disconnected, and null for ConnectivityManager to determine.public static java.lang.Boolean isConnected()
@NonNull public static ModuleProvider getModuleProvider()
public static boolean hasInstance()
INSTANCE
is present.