public class EnelXNETManager
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
EnelXNETManager.LoadChargeCallback |
static interface |
EnelXNETManager.ScanCallback |
static interface |
EnelXNETManager.StartChargeCallback |
static interface |
EnelXNETManager.StopChargeCallback |
| Constructor and Description |
|---|
EnelXNETManager() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String[] |
getMissingPermissions(android.content.Context context)
Returns an array with all those permissions that are required by the EnelX NET SDK but not
yet granted by the user.
|
static void |
loadCharge(android.content.Context context,
java.lang.String authToken,
java.lang.String chargeId,
EnelXNETManager.LoadChargeCallback callback)
Connects the given charging point and retrieve info about the given charge.
|
static void |
setQAPIAppId(java.lang.String appId)
Sets the App ID to be presented to Quisque API.
|
static void |
setQAPIBaseUrl(java.lang.String baseUrl)
Sets the base URL for Quisque API communication.
|
static void |
startCharge(android.content.Context context,
NETChargingPoint chargingPoint,
java.lang.String authToken,
java.lang.String chargeCardUid,
EnelXNETManager.StartChargeCallback callback)
Connects the given charging point and ask it to start charging.
|
static void |
startCharge(android.content.Context context,
java.lang.String evseId,
java.lang.String authToken,
java.lang.String chargeCardUid,
EnelXNETManager.StartChargeCallback callback)
Connects the given charging point and ask it to start charging.
|
static void |
startScan(android.content.Context context,
NETChargingPoint.Status[] statusFilter,
int maxDistanceInKilometers,
EnelXNETManager.ScanCallback callback)
Starts scanning for charging points within the given distance.
|
static void |
stopCharge(android.content.Context context,
java.lang.String authToken,
java.lang.String chargeId,
EnelXNETManager.StopChargeCallback callback)
Connects the given charging point and ask it to stop charging.
|
static void |
stopScan(android.content.Context context,
EnelXNETManager.ScanCallback callback) |
public static void setQAPIBaseUrl(java.lang.String baseUrl)
baseUrl - The base URL for Quisque API, without trailing slash.public static void setQAPIAppId(java.lang.String appId)
appId - The App ID to be presented to Quisque API.public static java.lang.String[] getMissingPermissions(android.content.Context context)
context - The application context.public static void startScan(android.content.Context context,
NETChargingPoint.Status[] statusFilter,
int maxDistanceInKilometers,
EnelXNETManager.ScanCallback callback)
If all requirements are met, the scanning operation is started and the caller is notified
through the EnelXNETManager.ScanCallback.onScanStarted() method. Since now on, the
scan is running until it is stopped by calling
stopScan(Context, ScanCallback) or until an error
causes the scanning operation to be automatically stopped. In both cases, the caller is
notified through the EnelXNETManager.ScanCallback.onScanStopped() method.
Charging points detected during the scan are notified to the caller through the
EnelXNETManager.ScanCallback.onChargingPoint(NETChargingPoint, EnelXNETManager.ScanCallback.Event) method.
If an error occurs, before or after the scan has been started, it is notified to the caller
through the EnelXNETManager.ScanCallback.onScanError(EnelXNETManager.ScanCallback.Error, Exception) method.
context - The application context.statusFilter - The charging point status filters. If null or empty,
no filter is applied and charging points in any status are returned.maxDistanceInKilometers - The max distance value, expressed in kilometers.callback - A callback object for receiving scan related events.public static void stopScan(android.content.Context context,
EnelXNETManager.ScanCallback callback)
public static void startCharge(android.content.Context context,
NETChargingPoint chargingPoint,
java.lang.String authToken,
java.lang.String chargeCardUid,
EnelXNETManager.StartChargeCallback callback)
context - The application context.chargingPoint - The target charging point.authToken - The user authorization token for Quisque API.chargeCardUid - The Charge Card UID needed to authorize the charge.callback - A callback object for notifying results.public static void startCharge(android.content.Context context,
java.lang.String evseId,
java.lang.String authToken,
java.lang.String chargeCardUid,
EnelXNETManager.StartChargeCallback callback)
context - The application context.evseId - The evse ID of the target charging point.authToken - The user authorization token for Quisque API.chargeCardUid - The Charge Card UID needed to authorize the charge.callback - A callback object for notifying results.public static void stopCharge(android.content.Context context,
java.lang.String authToken,
java.lang.String chargeId,
EnelXNETManager.StopChargeCallback callback)
context - The application context.authToken - The user authorization token for Quisque API.chargeId - The ID of the charge that has to be stopped.callback - A callback object for notifying results.public static void loadCharge(android.content.Context context,
java.lang.String authToken,
java.lang.String chargeId,
EnelXNETManager.LoadChargeCallback callback)
context - The application context.authToken - The user authorization token for Quisque API.chargeId - The ID of the charge that has to be retrieved.callback - A callback object for notifying results.