以 Android 13(33) 或更高版本为目的平台的应用,必须为每个广播吸取器指定 RECEIVER_EXPORTED或 RECEIVER_NOT_EXPORTED,否则当 App 实行注册广播吸取器时,系统会抛出 SecurityException
// This broadcast receiver should be able to receive broadcasts from other apps.// This option causes the same behavior as setting the broadcast receiver's// "exported" attribute to true in your app's manifest.context.registerReceiver(sharedBroadcastReceiver, intentFilter, RECEIVER_EXPORTED);// For app safety reasons, this private broadcast receiver should **NOT**// be able to receive broadcasts from other apps.context.registerReceiver(privateBroadcastReceiver, intentFilter, RECEIVER_NOT_EXPORTED);3.附近的WIFI装备权限