RangingMeasurement


public final class RangingMeasurement
extends Object implements Parcelable

java.lang.Object
   ↳ android.ranging.RangingMeasurement


Represents a ranging measurement.

This class provides a measurement result, such as a distance or angle.

Summary

Constants

int CONFIDENCE_HIGH

Ranging measurement with high confidence.

int CONFIDENCE_LOW

Ranging measurement with low confidence.

int CONFIDENCE_MEDIUM

Ranging measurement with medium confidence.

Inherited constants

Fields

public static final Creator<RangingMeasurement> CREATOR

Public methods

int describeContents()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

int getConfidence()

Returns the confidence score for this measurement.

double getMeasurement()

Returns the measurement value.

String toString()

Returns a string representation of the object.

void writeToParcel(Parcel dest, int flags)

Flatten this object in to a Parcel.

Inherited methods

Constants

CONFIDENCE_HIGH

public static final int CONFIDENCE_HIGH

Ranging measurement with high confidence.

Constant Value: 2 (0x00000002)

CONFIDENCE_LOW

public static final int CONFIDENCE_LOW

Ranging measurement with low confidence.

Constant Value: 0 (0x00000000)

CONFIDENCE_MEDIUM

public static final int CONFIDENCE_MEDIUM

Ranging measurement with medium confidence.

Constant Value: 1 (0x00000001)

Fields

CREATOR

public static final Creator<RangingMeasurement> CREATOR

Public methods

describeContents

public int describeContents ()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(android.os.Parcel, int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.

Returns
int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or CONTENTS_FILE_DESCRIPTOR

getConfidence

public int getConfidence ()

Returns the confidence score for this measurement.

Returns
int Value is CONFIDENCE_LOW, CONFIDENCE_MEDIUM, or CONFIDENCE_HIGH

getMeasurement

public double getMeasurement ()

Returns the measurement value.

Returns
double The measurement, such as a distance in meters or an angle in degrees.

toString

public String toString ()

Returns a string representation of the object.

Returns
String a string representation of the object.

writeToParcel

public void writeToParcel (Parcel dest, 
                int flags)

Flatten this object in to a Parcel.

Parameters
dest Parcel: This value cannot be null.

flags int: Additional flags about how the object should be written. May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of Parcelable.PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES