blob: 09b0a80313f6805d9d4d97683e3b52b5eca8c56c [file] [log] [blame]
Nick Pelly005b2282009-09-10 10:21:56 -07001/*
2 * Copyright (C) 2009 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.bluetooth;
18
19import android.annotation.SdkConstant;
20import android.annotation.SdkConstant.SdkConstantType;
21
22/**
23 * A helper to show a system "Device Picker" activity to the user.
24 *
25 * @hide
26 */
27public interface BluetoothDevicePicker {
28 public static final String EXTRA_NEED_AUTH =
29 "android.bluetooth.devicepicker.extra.NEED_AUTH";
30 public static final String EXTRA_FILTER_TYPE =
31 "android.bluetooth.devicepicker.extra.FILTER_TYPE";
32 public static final String EXTRA_LAUNCH_PACKAGE =
33 "android.bluetooth.devicepicker.extra.LAUNCH_PACKAGE";
34 public static final String EXTRA_LAUNCH_CLASS =
35 "android.bluetooth.devicepicker.extra.DEVICE_PICKER_LAUNCH_CLASS";
36
37 /**
38 * Broadcast when one BT device is selected from BT device picker screen.
Jake Hambyf51eada2010-09-21 13:39:53 -070039 * Selected {@link BluetoothDevice} is returned in extra data named
40 * {@link BluetoothDevice#EXTRA_DEVICE}.
Nick Pelly005b2282009-09-10 10:21:56 -070041 */
42 @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
43 public static final String ACTION_DEVICE_SELECTED =
44 "android.bluetooth.devicepicker.action.DEVICE_SELECTED";
45
46 /**
47 * Broadcast when someone want to select one BT device from devices list.
48 * This intent contains below extra data:
49 * - {@link #EXTRA_NEED_AUTH} (boolean): if need authentication
50 * - {@link #EXTRA_FILTER_TYPE} (int): what kinds of device should be
Jack Hea355e5e2017-08-22 16:06:54 -070051 * listed
Nick Pelly005b2282009-09-10 10:21:56 -070052 * - {@link #EXTRA_LAUNCH_PACKAGE} (string): where(which package) this
Jack Hea355e5e2017-08-22 16:06:54 -070053 * intent come from
Nick Pelly005b2282009-09-10 10:21:56 -070054 * - {@link #EXTRA_LAUNCH_CLASS} (string): where(which class) this intent
Jack Hea355e5e2017-08-22 16:06:54 -070055 * come from
Nick Pelly005b2282009-09-10 10:21:56 -070056 */
57 @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
58 public static final String ACTION_LAUNCH =
59 "android.bluetooth.devicepicker.action.LAUNCH";
60
61 /** Ask device picker to show all kinds of BT devices */
62 public static final int FILTER_TYPE_ALL = 0;
63 /** Ask device picker to show BT devices that support AUDIO profiles */
64 public static final int FILTER_TYPE_AUDIO = 1;
65 /** Ask device picker to show BT devices that support Object Transfer */
66 public static final int FILTER_TYPE_TRANSFER = 2;
Jack Hea355e5e2017-08-22 16:06:54 -070067 /**
68 * Ask device picker to show BT devices that support
69 * Personal Area Networking User (PANU) profile
70 */
Danica Chang6fdd0c62010-08-11 14:54:43 -070071 public static final int FILTER_TYPE_PANU = 3;
72 /** Ask device picker to show BT devices that support Network Access Point (NAP) profile */
73 public static final int FILTER_TYPE_NAP = 4;
Nick Pelly005b2282009-09-10 10:21:56 -070074}