I thought May be due to my phone room.
I do not have root privileges.....

On 2月17日, 下午1时12分, xi xia <[email protected]> wrote:
> I creat an  IntentFilter which manually calls BT broadcast receiver as
> follows:
>
> IntentFilter disConnectFilter = new
> IntentFilter(BluetoothDevice.ACTION_ACL_DISCONNECTED);
> registerReceiver(_disConnectReceiver, disConnectFilter);
>
> private BroadcastReceiver _disConnectReceiver = new
> BroadcastReceiver() {
>                 public void onReceive(Context context, Intent intent) {
>                         BluetoothDevice bdevice =
> intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
>                                 
> if(BluetoothDevice.ACTION_ACL_DISCONNECTED.equals(action)){
>                                         Log.d("acl disconnect", "acl 
> disconnect");
>                 }}}};
>
> But in Runtime I got the following Exception:
> ERROR/AndroidRuntime(4054): Caused by: java.lang.SecurityException:
> Permission Denial: not allowed to send broadcast
> android.bluetooth.device.action.ACTION_ACL_DISCONNECTED
>
> I gave both BT permission in my manifest file, but still it doesn't
> work .

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to