Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2087898
  • 博文数量: 413
  • 博客积分: 10926
  • 博客等级: 上将
  • 技术积分: 3862
  • 用 户 组: 普通用户
  • 注册时间: 2006-01-09 18:14
文章分类

全部博文(413)

文章存档

2015年(5)

2014年(1)

2013年(5)

2012年(6)

2011年(138)

2010年(85)

2009年(42)

2008年(46)

2007年(26)

2006年(59)

分类: Java

2009-03-11 15:01:16

android.bluetooth.intent.action.BONDING_CREATED
android.bluetooth.intent.action.BONDING_REMOVED
android.bluetooth.intent.action.DISABLED
android.bluetooth.intent.action.DISCOVERY_COMPLETED
android.bluetooth.intent.action.DISCOVERY_STARTED
android.bluetooth.intent.action.ENABLED
android.bluetooth.intent.action.HEADSET_STATE_CHANGED
android.bluetooth.intent.action.MODE_CHANGED
android.bluetooth.intent.action.NAME_CHANGED
  1. Docs
  2. Summary
    A broadcast receiver is a component that responds to system-wide broadcast announcements.

    More commonly, though, a broadcast receiver is just a "gateway" to other components and is intended to do a very minimal amount of work. For instance, it might initiate a service to perform some work based on the event.

  3. Register & Unregister
    • If the recevier need to be registered out of application, you must declare the receiver in Android Manifest. i.e, if you want the receiver to be triggered when the timer is up (via AlarmManager).
    • If the broadcast is sent from your-own applicaton, you need not to declare the broadcast receiver in Android Manifest. You must unregister the receiver when the component in which the receiver is registered is about destroyed, otherwise, Android system will report Receiver Leaks.
    • You must prevent a receiver (the same BroadcastReceiver instance) from being registered multiple times, otherwise, it will be triggered multiple time, and even if you unregister the receiver, it still will be triggered.
  4. Declare in Manifest or not
    • Need to declare in Manifest
      • The BroadCast receiver need to be registered by Android system automatically
      • The BroadCast receiver returned from PendingIntent.getBroadcast(xxx), such as for AlarmManager.
    • Need not to declare in Manifest
      • You registered in source code explicitly
    • xxx
  5. Sepcial Broadcast Action
    • com.android.vending.INSTALL_REFERRER
      Action to be broadcasted by Android package manager after an app is installed from the Market.
      ()
    • xxx
  6. xxx
Actions:
android.bluetooth.intent.action.PAIRING_CANCEL
android.bluetooth.intent.action.PAIRING_REQUEST
android.bluetooth.intent.action.REMOTE_ALIAS_CHANGED
android.bluetooth.intent.action.REMOTE_ALIAS_CLEARED
android.bluetooth.intent.action.REMOTE_DEVICE_CONNECTED
android.bluetooth.intent.action.REMOTE_DEVICE_DISAPPEARED
android.bluetooth.intent.action.REMOTE_DEVICE_DISAPPEARED
android.bluetooth.intent.action.REMOTE_DEVICE_DISCONNECTED
android.bluetooth.intent.action.REMOTE_DEVICE_DISCONNECT_REQUESTED
android.bluetooth.intent.action.REMOTE_DEVICE_FOUND
android.bluetooth.intent.action.REMOTE_NAME_FAILED
android.bluetooth.intent.action.REMOTE_NAME_UPDATED
android.intent.action.AIRPLANE_MODE
android.intent.action.BATTERY_CHANGED
android.intent.action.BATTERY_LOW
android.intent.action.BOOT_COMPLETED
android.intent.action.CAMERA_BUTTON
android.intent.action.CONFIGURATION_CHANGED
android.intent.action.DATA_SMS_RECEIVED
android.intent.action.DATE_CHANGED
android.intent.action.DEVICE_STORAGE_LOW
android.intent.action.DEVICE_STORAGE_OK
android.intent.action.GTALK_CONNECTED
android.intent.action.GTALK_DISCONNECTED
android.intent.action.HEADSET_PLUG
android.intent.action.MANAGE_PACKAGE_STORAGE
android.intent.action.MEDIA_BAD_REMOVAL
android.intent.action.MEDIA_BUTTON
android.intent.action.MEDIA_EJECT
android.intent.action.MEDIA_MOUNTED
android.intent.action.MEDIA_REMOVED
android.intent.action.MEDIA_SCANNER_FINISHED
android.intent.action.MEDIA_SCANNER_SCAN_FILE
android.intent.action.MEDIA_SCANNER_STARTED
android.intent.action.MEDIA_SHARED
android.intent.action.MEDIA_UNMOUNTABLE
android.intent.action.MEDIA_UNMOUNTED
android.intent.action.NEW_OUTGOING_CALL
android.intent.action.PACKAGE_ADDED
android.intent.action.PACKAGE_CHANGED
android.intent.action.PACKAGE_INSTALL
android.intent.action.PACKAGE_REMOVED
android.intent.action.PACKAGE_RESTARTED
android.intent.action.POWER_CONNECTED
android.intent.action.POWER_DISCONNECTED
android.intent.action.PROVIDER_CHANGED
android.intent.action.REBOOT
android.intent.action.SCREEN_OFF
android.intent.action.SCREEN_ON
android.intent.action.TIMEZONE_CHANGED
android.intent.action.TIME_SET
android.intent.action.TIME_TICK
android.intent.action.UID_REMOVED
android.intent.action.UMS_CONNECTED
android.intent.action.UMS_DISCONNECTED
android.intent.action.WALLPAPER_CHANGED
android.media.RINGER_MODE_CHANGED
android.media.VIBRATE_SETTING_CHANGED
android.net.wifi.NETWORK_IDS_CHANGED //The network IDs of the configured networks could have changed.
android.net.wifi.RSSI_CHANGED //The RSSI (signal strength) has changed.
android.net.wifi.SCAN_RESULTS //An access point scan has completed, and results are available from the supplicant.
android.net.wifi.STATE_CHANGE //Broadcast intent action indicating that the state of Wi-Fi connectivity has changed.
android.net.wifi.WIFI_STATE_CHANGED //Broadcast intent action indicating that Wi-Fi has been enabled, disabled,
enabling, disabling, or unknown.
android.net.wifi.supplicant.CONNECTION_CHANGE //Broadcast intent action indicating that a connection to the supplicant
has been established (and it is now possible to perform Wi-Fi operations) or the connection to the supplicant has been lost.
android.net.wifi.supplicant.STATE_CHANGE //Broadcast intent action indicating that the state of establishing a connection to
an access point has changed.
android.provider.Telephony.SIM_FULL
android.provider.Telephony.SMS_RECEIVED
android.provider.Telephony.WAP_PUSH_RECEIVED

android.net.conn.CONNECTIVITY_CHANGE //Broadcasted when the state of network connectivity is changed
阅读(3435) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~