public class SitumCalibrationManager extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
SitumCalibrationManager.UploadCalibrationCallback
Callback to receive the status of the upload operation
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addPoint(SitumFloorPoint fp)
Stores a calibration point
|
void |
cancel(android.content.Context context)
Cancel the current calibration without saving to the disk.
|
void |
deleteCalibrations(List<SitumCalibration> situmCalibrations)
Delete the given list of calibrations from the device internal storage
|
String |
getCalibrationName()
Deprecated.
|
SitumCalibration |
getCurrentCalibration()
Returns the current calibration
|
static SitumCalibrationManager |
getInstance(Building building)
Obtain the instance of the Calibration Manager
|
int |
getNumberOfSavedCalibrations(android.content.Context c)
Deprecated.
|
List<SitumCalibration> |
getSavedCalibrations(android.content.Context context)
Return the saved calibrations not uploaded
|
void |
removeLastPoint()
Removes last point.
|
void |
startNewCalibrationAt(android.content.Context c,
SitumFloorPoint fp,
boolean recordwifi,
boolean recordble)
Starts a new calibration
|
boolean |
stopAndSaveToDisk(android.content.Context c)
Stop the calibration and save the data to disk.
|
void |
uploadSavedCalibrations(android.content.Context c,
SitumCalibrationManager.UploadCalibrationCallback callback)
Upload the saved calibrations to the server and delete then from disk
|
void |
uploadSelectedCalibrations(android.content.Context c,
List<SitumCalibration> situmCalibrations,
SitumCalibrationManager.UploadCalibrationCallback callback)
Upload a list of calibrations previously saved in the disk.
|
public static SitumCalibrationManager getInstance(Building building)
building - Building to initialize the calibration managerpublic void startNewCalibrationAt(android.content.Context c,
SitumFloorPoint fp,
boolean recordwifi,
boolean recordble)
c - Application contextfp - A point inside the map (meters, meters). Origin is at bottom left cornerrecordwifi - Record wifirecordble - Record beaconspublic boolean addPoint(SitumFloorPoint fp)
fp - A point inside the map (meters, meters). Origin is at bottom left cornerpublic void removeLastPoint()
WARNING: No more points can be added to this Calibration after calling this method. A new calibration should be created for that pourpose.
@Deprecated public int getNumberOfSavedCalibrations(android.content.Context c)
getSavedCalibrations(Context)c - Context used to access files and uploading them to Situm Dashboardpublic List<SitumCalibration> getSavedCalibrations(android.content.Context context)
context - the context@Deprecated public String getCalibrationName()
getCurrentCalibration()public SitumCalibration getCurrentCalibration()
public boolean stopAndSaveToDisk(android.content.Context c)
c - Application contextpublic void cancel(android.content.Context context)
context - application contextpublic void uploadSavedCalibrations(android.content.Context c,
SitumCalibrationManager.UploadCalibrationCallback callback)
c - Application contextcallback - the callbackpublic void uploadSelectedCalibrations(android.content.Context c,
List<SitumCalibration> situmCalibrations,
SitumCalibrationManager.UploadCalibrationCallback callback)
c - application contextsitumCalibrations - list of calibration names to be uploaded to the servercallback - the callbackpublic void deleteCalibrations(List<SitumCalibration> situmCalibrations)
situmCalibrations - list of calibrations to be deleted