summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothDevicePicker.java
diff options
context:
space:
mode:
authorNick Pelly <npelly@google.com>2009-09-10 10:21:56 -0700
committerNick Pelly <npelly@google.com>2009-09-10 18:52:21 -0700
commitdac4c0d7c3ac27746fb8feaf8fc74221972ff5f2 (patch)
tree8506d9cfbf1dd88604ebb44dae5f791c20db3856 /framework/java/android/bluetooth/BluetoothDevicePicker.java
parent8a1cd0cdce892a6bd25bc7292007fe0220b3ae10 (diff)
API_CHANGE: Cleanup, javadoc and unhide more Bluetooth API.
This is a large batch, and covers: -- Bluetooth Device Discovery -- BluetoothAdapter.ACTION_DISCOVERY_STARTED BluetoothAdapter.ACTION_DISCOVERY_FINISHED BluetoothAdapter.startDiscovery() BluetoothAdapter.cancelDiscovery() BluetoothAdapter.isDiscovering() -- Bluetooth bonding (pairing) -- BluetoothAdapter.getBondedDevices() BluetoothDevice.ACTION_BOND_STATE_CHANGED BluetoothDevice.EXTRA_BOND_STATE BluetoothDevice.EXTRA_PREVIOUS_BOND_STATE BluetoothDevice.BOND_NONE BluetoothDevice.BOND_BONDING BluetoothDevice.BOND_BONDED BluetoothDevice.getBondState() BluetoothDevice.createBond() BluetoothDevice.cancelBondProcess() BluetoothDevice.removeBond() -- BluetoothClass -- BluetoothDevice.ACTION_CLASS_CHANGED BluetoothDevice.EXTRA_CLASS BluetoothDevice.getBluetoothClass() BluetoothClass.Service.* BluetoothClass.Device.Major.* BluetoothClass.Device.* BluetoothClass.getDeviceClass() BluetoothClass.getMajorDeviceClass() BluetoothClass.hasService() -- Misc BluetoothDevice -- BluetoothDevice.ACTION_ACL_CONNECTED BluetoothDevice.ACTION_ACL_DISCONNECTED_REQUESTED BluetoothDevice.ACTION_ACL_DISCONNECTED BluetoothDevice.ACTION_DISCOVERED BluetoothDevice.ACTION_NAME_CHANGED BluetoothDevice.EXTRA_DEVICE BluetoothDevice.EXTRA_NAME BluetoothDevice.EXTRA_RSSI -- Misc BluetoothAdapter -- BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED BluetoothAdapter.EXTRA_LOCAL_NAME BluetoothAdapter.checkBluetoothAddress() I deprecated BluetoothIntent and moved each intent into the class it relates to. Change-Id: I877b1280428ab46278b2bc25668bb44cda22dc36
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothDevicePicker.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothDevicePicker.java66
1 files changed, 66 insertions, 0 deletions
diff --git a/framework/java/android/bluetooth/BluetoothDevicePicker.java b/framework/java/android/bluetooth/BluetoothDevicePicker.java
new file mode 100644
index 0000000000..05eed0e6de
--- /dev/null
+++ b/framework/java/android/bluetooth/BluetoothDevicePicker.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.bluetooth;
+
+import android.annotation.SdkConstant;
+import android.annotation.SdkConstant.SdkConstantType;
+
+/**
+ * A helper to show a system "Device Picker" activity to the user.
+ *
+ * @hide
+ */
+public interface BluetoothDevicePicker {
+ public static final String EXTRA_NEED_AUTH =
+ "android.bluetooth.devicepicker.extra.NEED_AUTH";
+ public static final String EXTRA_FILTER_TYPE =
+ "android.bluetooth.devicepicker.extra.FILTER_TYPE";
+ public static final String EXTRA_LAUNCH_PACKAGE =
+ "android.bluetooth.devicepicker.extra.LAUNCH_PACKAGE";
+ public static final String EXTRA_LAUNCH_CLASS =
+ "android.bluetooth.devicepicker.extra.DEVICE_PICKER_LAUNCH_CLASS";
+
+ /**
+ * Broadcast when one BT device is selected from BT device picker screen.
+ * Selected BT device address is contained in extra string {@link BluetoothIntent}
+ */
+ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ public static final String ACTION_DEVICE_SELECTED =
+ "android.bluetooth.devicepicker.action.DEVICE_SELECTED";
+
+ /**
+ * Broadcast when someone want to select one BT device from devices list.
+ * This intent contains below extra data:
+ * - {@link #EXTRA_NEED_AUTH} (boolean): if need authentication
+ * - {@link #EXTRA_FILTER_TYPE} (int): what kinds of device should be
+ * listed
+ * - {@link #EXTRA_LAUNCH_PACKAGE} (string): where(which package) this
+ * intent come from
+ * - {@link #EXTRA_LAUNCH_CLASS} (string): where(which class) this intent
+ * come from
+ */
+ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ public static final String ACTION_LAUNCH =
+ "android.bluetooth.devicepicker.action.LAUNCH";
+
+ /** Ask device picker to show all kinds of BT devices */
+ public static final int FILTER_TYPE_ALL = 0;
+ /** Ask device picker to show BT devices that support AUDIO profiles */
+ public static final int FILTER_TYPE_AUDIO = 1;
+ /** Ask device picker to show BT devices that support Object Transfer */
+ public static final int FILTER_TYPE_TRANSFER = 2;
+}