public final class InrixCore extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
InrixCore.AuthenticationListener
Interface for receiving notifications when the user is authenticated or when the user needs to sign in.
|
static interface |
InrixCore.OnInrixReadyListener
Interface for receiving notifications when the INRIX SDK is ready to make
requests.
|
Modifier and Type | Field and Description |
---|---|
static int |
NO_VALUE
Indicates that no value was assigned.
|
Constructor and Description |
---|
InrixCore() |
Modifier and Type | Method and Description |
---|---|
static boolean |
addAuthenticationListener(InrixCore.AuthenticationListener listener)
Adds an
InrixCore.AuthenticationListener . |
static boolean |
addOnInrixReadyListener(InrixCore.OnInrixReadyListener listener)
Adds a listener that will receive a notification when the SDK is ready to make requests.
|
static void |
endTrackingSession()
Ends the tracking session.
|
static AlertsManager |
getAlertsManager()
Factory method to get an instance of
AlertsManager . |
static CameraManager |
getCameraManager()
Factory method to get an instance of
CameraManager . |
static CompositeTileManager |
getCompositeTileManager()
Factory method to get an instance of
CompositeTileManager . |
static Configuration |
getConfiguration()
Gets the configuration information.
|
static DangerousSlowdownsManager |
getDangerousSlowdownsManager()
Factory method to get an instance of
DangerousSlowdownsManager . |
static GasStationManager |
getGasStationManager()
Factory method to get an instance of
GasStationManager . |
static IncidentsManager |
getIncidentsManager()
Factory method to get an instance of
IncidentsManager . |
static InrixCore |
getInstance()
Gets the singleton
InrixCore instance. |
static ItineraryManager |
getItineraryManager()
Factory method to get an instance of
ItineraryManager . |
static LocationsManager |
getLocationsManager()
Factory method to get an instance of
LocationsManager . |
static ParkingManager |
getParkingManager()
Factory method to get an instance of
ParkingManager . |
static RouteManager |
getRouteManager()
Factory method to get an instance of
RouteManager . |
static ServiceAvailabilityManager |
getServiceAvailabilityManager()
Factory method to get an instance of
ServiceAvailabilityManager . |
static SpeedLimitManager |
getSpeedLimitManager()
Factory method to get an instance of
SpeedLimitManager . |
static String |
getSupportId()
Get the unique supportId.
|
static TileManager |
getTileManager()
Factory method to get an instance of
TileManager . |
static TrafficManager |
getTrafficManager()
Factory method to get an instance of
TrafficManager . |
static TripManager |
getTripManager()
Factory method to get an instance of
TripManager . |
static UserManager |
getUserManager()
Factory method to get an instance of
UserManager . |
static UserPropertyManager |
getUserPropertyManager()
Factory method to get an instance of
UserPropertyManager . |
static VehicleStateManager |
getVehicleStateManager()
Factory method to get an instance of
VehicleStateManager . |
static void |
initialize(Context context)
Initializes all required processes and loads the default configuration.
|
static void |
initialize(Context context,
Configuration configuration)
Initializes all required processes and loads the specified configuration.
|
static ICancellable |
invokeService(String actionName,
Map<String,Object> arguments,
GeoPoint region,
IDataResponseListener<String> listener)
Invoke arbitrary server API, given the API name and additional parameters required by the API.
|
static ICancellable |
invokeService(String endpoint,
String actionName,
Map<String,Object> arguments,
GeoPoint region,
IDataResponseListener<String> listener)
Invoke arbitrary server API, given the API name and additional parameters required by the API
with a custom end point.
|
static boolean |
isInitialized()
Returns whether the SDK is Initialized Refer
InrixCore.initialize(Context) . |
static boolean |
isReady()
Returns whether the SDK is ready to make requests.
|
static boolean |
isStopOnAppDestroy() |
static boolean |
removeAuthenticationListener(InrixCore.AuthenticationListener listener)
Removes the specified listener in order to stop receiving authentication events.
|
static boolean |
removeOnInrixReadyListener(InrixCore.OnInrixReadyListener listener)
Removes the specified listener in order to stop receiving notifications.
|
static void |
reset()
Reset the existing Inrix instance, clearing all user-related data.
|
static void |
resumeTrackingSession(Context context)
Resumes the tracking session.
|
static void |
shutdown()
Shut down the
InrixCore 's activity tracking and terminates all future scheduled tasks in the Sdk. |
static void |
startActivityRecognition(Context context)
Starts activity recognition tracking.
|
static void |
startResourcesClearSerivce() |
static void |
stopActivityRecognition()
Stops activity recognition tracking.
|
static void |
stopOnAppDestroy(boolean stopOnDestroy) |
static void |
stopResourcesClearService() |
public static final int NO_VALUE
public static void initialize(@NonNull Context context)
#initialize(Context)
:
context
- The Android context, which contains global information about
the application environment.SecurityException
- Thrown if caller does not have following permissions:
public static void initialize(@NonNull Context context, @NonNull Configuration configuration)
InrixCore.initialize(Context)
:
context
- The Android context, which contains global information about
the application environment.configuration
- SDK configuration.SecurityException
- Thrown if caller does not have following permissions:
public static void startResourcesClearSerivce()
public static void stopResourcesClearService()
public static void reset()
public static void shutdown()
InrixCore
's activity tracking and terminates all future scheduled tasks in the Sdk.public static InrixCore getInstance()
InrixCore
instance.InrixCore
instancepublic static void startActivityRecognition(Context context)
context
- The Android context, which contains global information about
the application environment.InrixCore.stopActivityRecognition()
public static void stopActivityRecognition()
public static void endTrackingSession()
InrixCore.resumeTrackingSession(android.content.Context)
.public static void resumeTrackingSession(Context context)
context
- The Android context, which contains global information about
the application environment.InrixCore.endTrackingSession()
public static Configuration getConfiguration()
public static boolean isReady()
true
if the SDK is ready; otherwise, false
.public static boolean isInitialized()
InrixCore.initialize(Context)
.true
if the SDK is Initialized; otherwise, false
.public static boolean addAuthenticationListener(InrixCore.AuthenticationListener listener)
InrixCore.AuthenticationListener
.listener
- The listener.true
if the listener was successfully added; otherwise,
false
.InrixCore.removeAuthenticationListener(com.inrix.sdk.InrixCore.AuthenticationListener)
public static boolean removeAuthenticationListener(InrixCore.AuthenticationListener listener)
listener
- The listener to remove.true
if the listener was removed; otherwise, false
.InrixCore.addAuthenticationListener(AuthenticationListener)
public static boolean addOnInrixReadyListener(InrixCore.OnInrixReadyListener listener)
InrixCore.OnInrixReadyListener.onInrixReady()
callback is received.listener
- The listener.true
if the listener was successfully added; otherwise false
.InrixCore.removeOnInrixReadyListener(com.inrix.sdk.InrixCore.OnInrixReadyListener)
,
InrixCore.OnInrixReadyListener
public static boolean removeOnInrixReadyListener(InrixCore.OnInrixReadyListener listener)
listener
- The listener to remove.true
if the listener was removed; otherwise, false
.InrixCore.addOnInrixReadyListener(com.inrix.sdk.InrixCore.OnInrixReadyListener)
public static ICancellable invokeService(@Nullable String actionName, @Nullable Map<String,Object> arguments, @Nullable GeoPoint region, @NonNull IDataResponseListener<String> listener)
actionName
- Target API name, may be null
.arguments
- Additional API parameters. Parameter value can be a
String
, Boolean
, Number
, Date
, GeoPoint
.region
- The region parameter for the api call.listener
- Response listener instance.ICancellable
to cancel the request.InrixException
- thrown when SDK is not initialized.InrixException
- thrown when actionName
is null
.InrixException
- thrown when listener
is null
.public static ICancellable invokeService(@Nullable String endpoint, @Nullable String actionName, @Nullable Map<String,Object> arguments, @Nullable GeoPoint region, @NonNull IDataResponseListener<String> listener)
endpoint
- Target endpoint, or null
to default to Connected Services.actionName
- Target API name, may be null
.arguments
- Additional API parameters. Parameter value can be a
String
, Boolean
, Number
, Date
, GeoPoint
.region
- The region parameter for the api call.listener
- Response listener instance.ICancellable
to cancel the request.InrixException
- thrown when SDK is not initialized.InrixException
- thrown when actionName
is null
.InrixException
- thrown when listener
is null
.public static UserManager getUserManager()
UserManager
.UserManager
public static AlertsManager getAlertsManager()
AlertsManager
.AlertsManager
public static TrafficManager getTrafficManager()
TrafficManager
.TrafficManager
public static TileManager getTileManager()
TileManager
.TileManager
public static ParkingManager getParkingManager()
ParkingManager
.ParkingManager
public static RouteManager getRouteManager()
RouteManager
.RouteManager
public static LocationsManager getLocationsManager()
LocationsManager
.LocationsManager
public static IncidentsManager getIncidentsManager()
IncidentsManager
.IncidentsManager
public static GasStationManager getGasStationManager()
GasStationManager
.GasStationManager
public static CompositeTileManager getCompositeTileManager()
CompositeTileManager
.CompositeTileManager
public static ServiceAvailabilityManager getServiceAvailabilityManager()
ServiceAvailabilityManager
.ServiceAvailabilityManager
public static TripManager getTripManager()
TripManager
.TripManager
public static CameraManager getCameraManager()
CameraManager
.CameraManager
public static ItineraryManager getItineraryManager()
ItineraryManager
.ItineraryManager
public static VehicleStateManager getVehicleStateManager()
VehicleStateManager
.VehicleStateManager
public static UserPropertyManager getUserPropertyManager()
UserPropertyManager
.UserPropertyManager
.public static DangerousSlowdownsManager getDangerousSlowdownsManager()
DangerousSlowdownsManager
.DangerousSlowdownsManager
.public static SpeedLimitManager getSpeedLimitManager()
SpeedLimitManager
.SpeedLimitManager
.public static String getSupportId()
public static void stopOnAppDestroy(boolean stopOnDestroy)
public static boolean isStopOnAppDestroy()
Copyright © 2013-2018 INRIX, Inc. All Rights Reserved.