Verzeichnis suchen
android Manifest Manifest.permission Manifest.permission_group android.accessibilityservice AccessibilityService android.accounts Account android.app NotificationManager android.bluetooth BluetoothAdapter BluetoothClass BluetoothClass.Device BluetoothClass.Device.Major BluetoothClass.Service BluetoothDevice BluetoothServerSocket BluetoothSocket android.content SharedPreferences android.database.sqlite SQLiteCursorDriver SQLiteOpenHelper android.graphics Bitmap android.location LocationListener Geocoder GpsStatus GpsStatus.Listener GpsStatus.NmeaListener GpsSatellite android.media AudioFormat AsyncPlayer AudioRecord AudioRecord.OnRecordPositionUpdateListener ThumbnailUtils AudioManager android.net TrafficStats MailTo LocalSocket android.os AsyncTask AsyncTask.Status CountDownTimer Message MessageQueue HandlerThread android.text Html android.util JsonWriter android.view ContextMenu ContextMenu.ContextMenuInfo Display ViewManager View ViewStub ViewTreeObserver ViewParent WindowManager GestureDetector Gravity MenuInflater ScaleGestureDetector SoundEffectConstants android.view.inputmethod InputConnection InputMethod InputMethodSession BaseInputConnection InputMethodManager android.widget AbsListView AbsListView.LayoutParams AbsListView.OnScrollListener AbsListView.RecyclerListener AbsoluteLayout AbsoluteLayout.LayoutParams AbsSeekBar AbsSpinner AdapterView AdapterView.AdapterContextMenuInfo AdapterView.OnItemLongClickListener AdapterView.OnItemSelectedListener AdapterView.OnItemClickListener AnalogClock BaseAdapter BaseExpandableListAdapter Button CheckBox CheckedTextView Checkable Chronometer Chronometer.OnChronometerTickListener CompoundButton CompoundButton.OnCheckedChangeListener CursorAdapter CursorTreeAdapter DatePicker DatePicker.OnDateChangedListener DialerFilter DigitalClock EditText Filter Filter.FilterListener Filter.FilterResults ExpandableListAdapter ExpandableListView.OnChildClickListener ExpandableListView.OnGroupClickListener ExpandableListView.OnGroupCollapseListener ExpandableListView.OnGroupExpandListener Filterable Gallery Gallery.LayoutParams GridView GridLayout GridLayout.Alignment RadioGroup ImageView ImageView.ScaleType HorizontalScrollView ImageButton ImageSwitcher FilterQueryProvider ListAdapter ListView MediaController MultiAutoCompleteTextView MultiAutoCompleteTextView.CommaTokenizer MultiAutoCompleteTextView.Tokenizer QuickContactBadge RadioButton RatingBar RatingBar.OnRatingBarChangeListener RelativeLayout RemoteViews ResourceCursorAdapter ResourceCursorTreeAdapter Scroller ScrollView SearchView SearchView.OnCloseListener SearchView.OnQueryTextListener SearchView.OnSuggestionListener SeekBar SeekBar.OnSeekBarChangeListener SimpleAdapter SimpleAdapter.ViewBinder SimpleCursorAdapter SimpleCursorAdapter.CursorToStringConverter SimpleCursorAdapter.ViewBinder SimpleCursorTreeAdapter SimpleCursorTreeAdapter.ViewBinder SimpleExpandableListAdapter SlidingDrawer SlidingDrawer.OnDrawerCloseListener SlidingDrawer.OnDrawerOpenListener SlidingDrawer.OnDrawerScrollListener Spinner SpinnerAdapter WrapperListAdapter TabHost TabHost.TabSpec TextView TimePicker TimePicker.OnTimeChangedListener Toast TableLayout TableLayout.LayoutParams TableRow TableRow.LayoutParams TabWidget TextSwitcher ToggleButton TwoLineListItem VideoView ViewAnimator ViewFlipper ViewSwitcher ViewSwitcher.ViewFactory ZoomButtonsController ZoomButtonsController.OnZoomListener ZoomButton ZoomControls dalvik.system DexFile
Figuren


GpsStatus

版本:Android 3.2 r1

结构

继承关系

public final class GpsStatus extends Object

java.lang.Object

android.location.GpsStatus

类概述

此类用于表述GPS引擎的当前状态,此类需要和GpsStatus.Listener接口结合使用。

常量

int GPS_EVENT_FIRST_FIX

GPS系统模块接收到第一次GPS定位信息之后发送此事件码。调用getTimeToFirstFix()方法获取自GPS系统模块被开启至第一次定位所消耗的时间。

常量值:3(0x00000003)

int GPS_EVENT_SATELLITE_STATUS

周期性发送GPS卫星状态的事件码。调用getSatellites()方法获取每一颗定位卫星的各种状态。(译者注:此事件码需在获取到卫星状态之后,才会发送。在没有搜索到卫星的时候,不会发送此事件码。)

常量值:4 (0x00000004)

int GPS_EVENT_STARTED

GPS系统模块被开启之后发送此事件码。

常量值:1 (0x00000001)

int GPS_EVENT_STOPPED

GPS系统模块被关闭之后发送此事件码。

常量值:2 (0x00000002)

内部类

interface GpsStatus.Listener

用于接收当GPS状态发生改变时所发出的通知

interface GpsStatus.NmeaListener

用于从GPS接收NMEA信息。

公共方法

public int getMaxSatellites ()

返回通过getSatellites()方法返回的卫星列表的最大卫星数。

返回值

最大卫星数。

public Iterable<GpsSatellite> getSatellites ()

返回一组用于描述GPS引擎当前状态的卫星对象。

返回值

一组卫星对象。

public int getTimeToFirstFix ()

返回自GPS引擎最新启动以来至收到的首次定位所需的时间。

返回值

首次定位所需的时间

补充

文章精选

百度百科 GPS

Android定位功能(一)

Android定位功能(二)


Vorheriger Artikel: Nächster Artikel: