I have setup a BroadcastReceiver on BluetoothDevice.ActionFound to discover BT devices and I'm receiving notifications.
I'm now trying to adapt to Monodroid the following Android code:

BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);

As Monodroid has not implemented that method, I found in the Forum, a similar problem in the case of NetworkInfo. Trying to do the same I end up with:

IntPtr getParcelableExtra = JNIEnv.GetMethodID(intent.Class.Handle, "getParcelableExtra", "(Ljava/lang/String;)Landroid/os/Parcelable;"); IntPtr _ni = JNIEnv.CallObjectMethod(intent.Handle, getParcelableExtra, new JValue(new Java.Lang.String(BluetoothDevice.ExtraDevice)));
BluetoothDevice device = new BluetoothDevice(_ni);

But the last method has no IntPtr parameter (_ni) to use....
BluetoothDevice device = new BluetoothDevice(_ni);

Can you give me any idea how to complete that ?
Thanks for any help

_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to