IT. Expert System.

Android Reference

LocationProvider


android.location

Class LocationProvider



  • public class LocationProvider
    extends Object
    An abstract superclass for location providers. A location provider provides periodic reports on the geographical location of the device.

    Each provider has a set of criteria under which it may be used; for example, some providers require GPS hardware and visibility to a number of satellites; others require the use of the cellular radio, or access to a specific carrier's network, or to the internet. They may also have different battery consumption characteristics or monetary costs to the user. The Criteria class allows providers to be selected based on user-specified criteria.

    • Constructor Summary

      Constructors
      Constructor and Description
      LocationProvider(String name, com.android.internal.location.ProviderProperties properties)
      Constructs a LocationProvider with the given name.
    • Method Summary

      Methods
      Modifier and Type Method and Description
      int getAccuracy()
      Returns a constant describing horizontal accuracy of this provider.
      String getName()
      Returns the name of this provider.
      int getPowerRequirement()
      Returns the power requirement for this provider.
      boolean hasMonetaryCost()
      Returns true if the use of this provider may result in a monetary charge to the user, false if use is free.
      boolean meetsCriteria(Criteria criteria)
      Returns true if this provider meets the given criteria, false otherwise.
      static boolean propertiesMeetCriteria(String name, com.android.internal.location.ProviderProperties properties, Criteria criteria)
      boolean requiresCell()
      Returns true if the provider requires access to an appropriate cellular network (e.g., to make use of cell tower IDs), false otherwise.
      boolean requiresNetwork()
      Returns true if the provider requires access to a data network (e.g., the Internet), false otherwise.
      boolean requiresSatellite()
      Returns true if the provider requires access to a satellite-based positioning system (e.g., GPS), false otherwise.
      boolean supportsAltitude()
      Returns true if the provider is able to provide altitude information, false otherwise.
      boolean supportsBearing()
      Returns true if the provider is able to provide bearing information, false otherwise.
      boolean supportsSpeed()
      Returns true if the provider is able to provide speed information, false otherwise.
    • Constructor Detail

      • LocationProvider

        public LocationProvider(String name,
                        com.android.internal.location.ProviderProperties properties)
        Constructs a LocationProvider with the given name. Provider names must consist only of the characters [a-zA-Z0-9].
        Throws:
        IllegalArgumentException - if name contains an illegal character
    • Method Detail

      • getName

        public String getName()
        Returns the name of this provider.
      • meetsCriteria

        public boolean meetsCriteria(Criteria criteria)
        Returns true if this provider meets the given criteria, false otherwise.
      • propertiesMeetCriteria

        public static boolean propertiesMeetCriteria(String name,
                                     com.android.internal.location.ProviderProperties properties,
                                     Criteria criteria)
      • requiresNetwork

        public boolean requiresNetwork()
        Returns true if the provider requires access to a data network (e.g., the Internet), false otherwise.
      • requiresSatellite

        public boolean requiresSatellite()
        Returns true if the provider requires access to a satellite-based positioning system (e.g., GPS), false otherwise.
      • requiresCell

        public boolean requiresCell()
        Returns true if the provider requires access to an appropriate cellular network (e.g., to make use of cell tower IDs), false otherwise.
      • hasMonetaryCost

        public boolean hasMonetaryCost()
        Returns true if the use of this provider may result in a monetary charge to the user, false if use is free. It is up to each provider to give accurate information.
      • supportsAltitude

        public boolean supportsAltitude()
        Returns true if the provider is able to provide altitude information, false otherwise. A provider that reports altitude under most circumstances but may occassionally not report it should return true.
      • supportsSpeed

        public boolean supportsSpeed()
        Returns true if the provider is able to provide speed information, false otherwise. A provider that reports speed under most circumstances but may occassionally not report it should return true.
      • supportsBearing

        public boolean supportsBearing()
        Returns true if the provider is able to provide bearing information, false otherwise. A provider that reports bearing under most circumstances but may occassionally not report it should return true.
      • getPowerRequirement

        public int getPowerRequirement()
        Returns the power requirement for this provider.
        Returns:
        the power requirement for this provider, as one of the constants Criteria.POWER_REQUIREMENT_*.
      • getAccuracy

        public int getAccuracy()
        Returns a constant describing horizontal accuracy of this provider. If the provider returns finer grain or exact location, Criteria.ACCURACY_FINE is returned, otherwise if the location is only approximate then Criteria.ACCURACY_COARSE is returned.


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: 2269 / . Delta: 0.01007 с