亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

目錄 搜尋
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
文字


BluetoothClass

版本:Android 2.3 r1

?

結(jié)構(gòu)

繼承關(guān)系

public final class BluetoothClass extends Object implements Parcelable

????????

java.lang.Object

android.bluetooth.BluetoothClass

?

類概述

代表一個(gè)描述了設(shè)備通用特性和功能的藍(lán)牙類。比如,一個(gè)藍(lán)牙類會(huì)指定皆如電話、計(jì)算機(jī)或耳機(jī)的通用設(shè)備類型,可以提供皆如音頻或者電話的服務(wù)。

每個(gè)藍(lán)牙類都是有0個(gè)或更多的服務(wù)類,以及一個(gè)設(shè)備類組成。設(shè)備類將被分解成主要和較小的設(shè)備類部分。

BluetoothClass 用作一個(gè)能粗略描述一個(gè)設(shè)備(比如關(guān)閉用戶界面上一個(gè)圖標(biāo)的設(shè)備)的線索,但當(dāng)藍(lán)牙服務(wù)事實(shí)上是被一個(gè)設(shè)備所支撐的時(shí)候,BluetoothClass的 介紹則不那么可信任。精確的服務(wù)搜尋通過(guò)SDP請(qǐng)求來(lái)完成。當(dāng)運(yùn)用createRfcommSocketToServiceRecord(UUID) listenUsingRfcommWithServiceRecord(String, UUID)來(lái)創(chuàng)建RFCOMM端口的時(shí)候,SDP請(qǐng)求就會(huì)自動(dòng)執(zhí)行。

使用getBluetoothClass()方法來(lái)獲取為遠(yuǎn)程設(shè)備所提供的類。

?

內(nèi)部類

???????? class ?????? BluetoothClass.Device ?

定義所有設(shè)備類的常量

?

class ?????? BluetoothClass.Service

定義所有服務(wù)類的常量

?

公共方法

???????? public int describeContents ()

描述包含在可封裝編組的表示中所有特殊對(duì)象的種類。

??????? 返回值

??????????? 一個(gè)指示被Parcelabel所排列的特殊對(duì)象類型集合的位掩碼。

???

??? public boolean equals (Object o)

??? 比較帶有特定目標(biāo)的常量。如果他們相等則標(biāo)示出來(lái)。 為了保證其相等,o必須代表相同的對(duì)象,該對(duì)象作為這個(gè)使用類依賴比較的常量。通常約定,該比較既要可移植又需靈活。

當(dāng)且僅當(dāng)o是一個(gè)作為接收器(使用==操作符來(lái)做比較)的精確相同的對(duì)象是,這個(gè)對(duì)象的實(shí)現(xiàn)才返回true值。子類通常實(shí)現(xiàn)equals(Object)方法,這樣它才會(huì)重視這兩個(gè)對(duì)象的類型和狀態(tài)。

通常約定,對(duì)于equals(Object)hashCode() 方法,如果equals對(duì)于任意兩個(gè)對(duì)象返回真值,那么hashCode()必須對(duì)這些對(duì)象返回相同的紙。這意味著對(duì)象的子類通常都覆蓋或者都不覆蓋這兩個(gè)方法。

??? 參數(shù)

??????? o?? 需要對(duì)比常量的對(duì)象

??? 返回值

??????? 如果特定的對(duì)象和該對(duì)象相等則返回true,否則返回false。

?

public int getDeviceClass ()

返回BluetoothClass中的設(shè)備類部分(主要的和較小的)

從函數(shù)中返回的值可以和在BluetoothClass.Device中的公共常量做比較,從而確定哪個(gè)設(shè)備類在這個(gè)藍(lán)牙類中是被編碼的。

返回值

??? 設(shè)備類部分

?

??? public int getMajorDeviceClass ()

??? 返回BluetoothClass中設(shè)備類的主要部分

從函數(shù)中返回的值可以和在BluetoothClass.Device.Major中的公共常量做比較,從而確定哪個(gè)主要類在這個(gè)藍(lán)牙類中是被編碼的。

返回值

主要設(shè)備類部分

?

??? public boolean hasService (int service)

???????? 如果該指定服務(wù)類被BluetoothClass所支持,則返回true

BluetoothClass.Service中,合法的服務(wù)類是公共常量,比如AUDIO類。

參數(shù)

service 合法服務(wù)類

返回值

如果該服務(wù)類可被支持,則返回true

?

??? public int hashCode ()

???????? 返回這個(gè)對(duì)象的整型哈希碼。按約定,任意兩個(gè)在equals(Object)中返回true的對(duì)象必須返回相同的哈希碼。這意味著對(duì)象的子類通常通常覆蓋或者都不覆蓋這兩個(gè)方法。

注意:除非同等對(duì)比信息發(fā)生改變,否則哈希碼不隨時(shí)間改變而改變。

如果你想要實(shí)現(xiàn)你自己的哈希碼方法,參見(jiàn)Writing a correct hashCode method。

返回值

該對(duì)象的哈希碼

?

??? public String toString ()??

返回這個(gè)對(duì)象的字符串,該字符串包含精確且可讀的介紹。系統(tǒng)鼓勵(lì)子類去重寫該方法,并且提供了能對(duì)該對(duì)象的類型和數(shù)據(jù)進(jìn)行重視的實(shí)現(xiàn)方法。默認(rèn)的實(shí)現(xiàn)方法只是簡(jiǎn)單地把類名、“@“符號(hào)和該對(duì)象hashCode()方法的16進(jìn)制數(shù)連接起來(lái)(如下列所示的表達(dá)式):

如果你想實(shí)現(xiàn)你自己的toString方法,參見(jiàn)Writing a useful toString method。

返回值

該對(duì)象中一個(gè)可被打印的字符串。

?

??? public void writeToParcel (Parcel out, int flags)

???????? 將類的數(shù)據(jù)寫入外部提供的Parcel

??????? 參數(shù)

out ??? 對(duì)象需要被寫入的Parcel

flags ? 和對(duì)象需要如何被寫入有關(guān)的附加標(biāo)志??赡苁?span lang="EN-US">0,或者可能是PARCELABLE_WRITE_RETURN_VALUE。


上一篇: 下一篇: