亚洲国产日韩欧美一区二区三区,精品亚洲国产成人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
テキスト


NotificationManager

版本:Android 4.0 r1

?

結(jié)構(gòu)

繼承關(guān)系

public class NotificationManager extends Object

????????

java.lang.Object

android.app.NotificationManager

?

類概述

該類用來(lái)向用戶通知發(fā)生的事情。用來(lái)告訴用戶在后臺(tái)發(fā)生的某些事情。

通知有下列一些形式:

l?? 在狀態(tài)欄中顯示一個(gè)圖片,可以通過(guò)launcher來(lái)訪問(wèn)(當(dāng)用戶點(diǎn)擊該圖片會(huì)啟動(dòng)一個(gè)預(yù)先定義好的intent

l?? 打開(kāi)或者閃爍設(shè)備上的LED

l?? 或者通知用戶通過(guò)閃爍的背光燈、播放聲音或者震動(dòng)

每個(gè)通知方法接受一個(gè)整型的id,還有一個(gè)字符串的標(biāo)簽參數(shù)可選,該參數(shù)可以為空。這兩個(gè)參數(shù)被用來(lái)組成一對(duì)(tag,id)或者如果標(biāo)簽沒(méi)有指定則為(nullid)。這對(duì)參數(shù)用來(lái)在應(yīng)用程序和系統(tǒng)中標(biāo)識(shí)該通知。所以這對(duì)參數(shù)在你的程序中應(yīng)該唯一。

如果你在通知方法時(shí)傳遞該參數(shù)對(duì)(tagid)和一些新的通知參數(shù),如果(tagid)對(duì)應(yīng)的通知應(yīng)經(jīng)在運(yùn)行,則對(duì)應(yīng)的通知會(huì)被更新。舉個(gè)例子來(lái)說(shuō):如果你傳遞一個(gè)新的狀態(tài)欄圖片,狀態(tài)欄中老的圖片會(huì)被新的圖片所替換。該(tag,id)也用來(lái)傳遞給cancelId)或者cancelStringint)方法來(lái)清除這些通知。

NotificationManager不用實(shí)例化,可以通過(guò)getSystemServiceString)方法來(lái)獲得。

開(kāi)發(fā)者指南:創(chuàng)建一個(gè)通知,請(qǐng)閱讀Status Bar Notifications開(kāi)發(fā)者指南。

?

公共方法

public void cancel (int id)

???????? 移除一個(gè)已經(jīng)顯示的通知,如果該通知是短暫的,會(huì)隱藏視圖;如果通知是持久的,會(huì)從狀態(tài)欄中移除。

參數(shù)

??????????????????????????? id????? 通知的id

??????????????????

public void cancel (String tag,int id)

移除一個(gè)已經(jīng)顯示的通知,如果該通知是短暫的,會(huì)隱藏視圖;如果通知是持久的,會(huì)從狀態(tài)欄中移除。????????

參數(shù)

??????????????????????????? tag?? 通知的標(biāo)簽

??????????????????????????? id????? 通知的id

?

public void cancelAll ()

???????? 移除所有的已經(jīng)顯示的通知,詳細(xì)行為見(jiàn)cancel(int)。

?

public void notify (int id,Notification notification)

???????? 提交一個(gè)通知在狀態(tài)欄中顯示。如果擁有相同id的通知已經(jīng)被提交而且沒(méi)有被移除,該方法會(huì)用新的信息來(lái)替換之前的通知。

參數(shù)

?????????????????? id????? 應(yīng)用中通知的唯一標(biāo)識(shí)

notification?????? 一個(gè)通知對(duì)象用來(lái)描述向用戶展示什么信息,不能為空

?

public void notify (String tagint id,Notification notification)

提交一個(gè)通知在狀態(tài)欄中顯示。如果擁有相同標(biāo)簽和相同id的通知已經(jīng)被提交而且沒(méi)有被移除,該方法會(huì)用更新的信息來(lái)替換之前的通知。

參數(shù)

???????? tag?? 用來(lái)標(biāo)識(shí)通知的字符串,可以為空。

??????????????????????????? id????? 應(yīng)用中通知的唯一標(biāo)識(shí)。

??????????????????????????? notification?????? 一個(gè)通知對(duì)象用來(lái)描述向用戶展示什么信息,不能為空。

?

補(bǔ)充

文章精選

AndroidNotification詳解【android進(jìn)化三十五】

?

?


前の記事: 次の記事: