IT. Expert System.

Android Reference

Criteria


android.location

Class Criteria

  • All Implemented Interfaces:
    Parcelable


    public class Criteria
    extends Object
    implements Parcelable
    A class indicating the application criteria for selecting a location provider. Providers maybe ordered according to accuracy, power usage, ability to report altitude, speed, and bearing, and monetary cost.
    • Field Detail

      • NO_REQUIREMENT

        public static final int NO_REQUIREMENT
        A constant indicating that the application does not choose to place requirement on a particular feature.
        See Also:
        Constant Field Values
      • POWER_LOW

        public static final int POWER_LOW
        A constant indicating a low power requirement.
        See Also:
        Constant Field Values
      • POWER_MEDIUM

        public static final int POWER_MEDIUM
        A constant indicating a medium power requirement.
        See Also:
        Constant Field Values
      • POWER_HIGH

        public static final int POWER_HIGH
        A constant indicating a high power requirement.
        See Also:
        Constant Field Values
      • ACCURACY_FINE

        public static final int ACCURACY_FINE
        A constant indicating a finer location accuracy requirement
        See Also:
        Constant Field Values
      • ACCURACY_COARSE

        public static final int ACCURACY_COARSE
        A constant indicating an approximate accuracy requirement
        See Also:
        Constant Field Values
      • ACCURACY_LOW

        public static final int ACCURACY_LOW
        A constant indicating a low location accuracy requirement - may be used for horizontal, altitude, speed or bearing accuracy. For horizontal and vertical position this corresponds roughly to an accuracy of greater than 500 meters.
        See Also:
        Constant Field Values
      • ACCURACY_MEDIUM

        public static final int ACCURACY_MEDIUM
        A constant indicating a medium accuracy requirement - currently used only for horizontal accuracy. For horizontal position this corresponds roughly to to an accuracy of between 100 and 500 meters.
        See Also:
        Constant Field Values
      • ACCURACY_HIGH

        public static final int ACCURACY_HIGH
        a constant indicating a high accuracy requirement - may be used for horizontal, altitude, speed or bearing accuracy. For horizontal and vertical position this corresponds roughly to an accuracy of less than 100 meters.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Criteria

        public Criteria()
        Constructs a new Criteria object. The new object will have no requirements on accuracy, power, or response time; will not require altitude, speed, or bearing; and will not allow monetary cost.
      • Criteria

        public Criteria(Criteria criteria)
        Constructs a new Criteria object that is a copy of the given criteria.
    • Method Detail

      • setSpeedAccuracy

        public void setSpeedAccuracy(int accuracy)
        Indicates the desired speed accuracy. Accuracy may be ACCURACY_LOW, ACCURACY_HIGH, or NO_REQUIREMENT. More accurate location may consume more power and may take longer.
        Throws:
        IllegalArgumentException - if accuracy is not one of the supported constants
      • setBearingAccuracy

        public void setBearingAccuracy(int accuracy)
        Indicates the desired bearing accuracy. Accuracy may be ACCURACY_LOW, ACCURACY_HIGH, or NO_REQUIREMENT. More accurate location may consume more power and may take longer.
        Throws:
        IllegalArgumentException - if accuracy is not one of the supported constants
      • setAccuracy

        public void setAccuracy(int accuracy)
        Indicates the desired accuracy for latitude and longitude. Accuracy may be ACCURACY_FINE if desired location is fine, else it can be ACCURACY_COARSE. More accurate location may consume more power and may take longer.
        Throws:
        IllegalArgumentException - if accuracy is not one of the supported constants
      • getAccuracy

        public int getAccuracy()
        Returns a constant indicating desired accuracy of location Accuracy may be ACCURACY_FINE if desired location is fine, else it can be ACCURACY_COARSE.
      • setPowerRequirement

        public void setPowerRequirement(int level)
        Indicates the desired maximum power level. The level parameter must be one of NO_REQUIREMENT, POWER_LOW, POWER_MEDIUM, or POWER_HIGH.
      • getPowerRequirement

        public int getPowerRequirement()
        Returns a constant indicating the desired power requirement. The returned
      • setCostAllowed

        public void setCostAllowed(boolean costAllowed)
        Indicates whether the provider is allowed to incur monetary cost.
      • isCostAllowed

        public boolean isCostAllowed()
        Returns whether the provider is allowed to incur monetary cost.
      • setAltitudeRequired

        public void setAltitudeRequired(boolean altitudeRequired)
        Indicates whether the provider must provide altitude information. Not all fixes are guaranteed to contain such information.
      • isAltitudeRequired

        public boolean isAltitudeRequired()
        Returns whether the provider must provide altitude information. Not all fixes are guaranteed to contain such information.
      • setSpeedRequired

        public void setSpeedRequired(boolean speedRequired)
        Indicates whether the provider must provide speed information. Not all fixes are guaranteed to contain such information.
      • isSpeedRequired

        public boolean isSpeedRequired()
        Returns whether the provider must provide speed information. Not all fixes are guaranteed to contain such information.
      • setBearingRequired

        public void setBearingRequired(boolean bearingRequired)
        Indicates whether the provider must provide bearing information. Not all fixes are guaranteed to contain such information.
      • isBearingRequired

        public boolean isBearingRequired()
        Returns whether the provider must provide bearing information. Not all fixes are guaranteed to contain such information.
      • describeContents

        public int describeContents()
        Description copied from interface: Parcelable
        Describe the kinds of special objects contained in this Parcelable's marshalled representation.
        Specified by:
        describeContents in interface Parcelable
        Returns:
        a bitmask indicating the set of special object types marshalled by the Parcelable.
      • toString

        public String toString()
        Description copied from class: Object
        Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:
           getClass().getName() + '@' + Integer.toHexString(hashCode())

        See Writing a useful toString method if you intend implementing your own toString method.

        Overrides:
        toString in class Object
        Returns:
        a printable representation of this object.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 1591 / 96487390. Delta: 0.23150 с