From a633bfde2d6c29465efb95a1348fa017c37f7266 Mon Sep 17 00:00:00 2001 From: Martijn Coenen Date: Thu, 5 Apr 2012 10:41:01 -0700 Subject: Force bluetooth OPP to handle ACTION_SEND. Change-Id: Ib9520b53d699a79d9a7c09cdb3eb27c4e001d7fd --- src/com/android/nfc/handover/BluetoothOppHandover.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/android/nfc/handover/BluetoothOppHandover.java b/src/com/android/nfc/handover/BluetoothOppHandover.java index 5952131..196bcf5 100644 --- a/src/com/android/nfc/handover/BluetoothOppHandover.java +++ b/src/com/android/nfc/handover/BluetoothOppHandover.java @@ -32,11 +32,12 @@ public class BluetoothOppHandover { * to begin the BT sequence. Must be called on Main thread. */ public void start() { - //TODO: Should call setActivity to make sure it goes to Bluetooth //TODO: either open up BluetoothOppLauncherActivity to all MIME types // or gracefully handle mime types that can't be sent Log.d(TAG, "Sending handover intent for " + mDevice.getAddress()); Intent intent = new Intent(Intent.ACTION_SEND); + // TODO see if this can be made more robust + intent.setPackage("com.android.bluetooth"); intent.setType(mMimeType); intent.putExtra(Intent.EXTRA_STREAM, mUri); intent.putExtra(BluetoothDevice.EXTRA_DEVICE, mDevice); -- cgit v1.1