Home | History | Annotate | Download | only in bluetooth
      1 /*
      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 
     17 package android.bluetooth;
     18 
     19 import android.annotation.SdkConstant;
     20 import android.annotation.SdkConstant.SdkConstantType;
     21 
     22 /**
     23  * A helper to show a system "Device Picker" activity to the user.
     24  *
     25  * @hide
     26  */
     27 public 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.
     39      * Selected {@link BluetoothDevice} is returned in extra data named
     40      * {@link BluetoothDevice#EXTRA_DEVICE}.
     41      */
     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
     51      * listed
     52      * - {@link #EXTRA_LAUNCH_PACKAGE} (string): where(which package) this
     53      * intent come from
     54      * - {@link #EXTRA_LAUNCH_CLASS} (string): where(which class) this intent
     55      * come from
     56      */
     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;
     67     /**
     68      * Ask device picker to show BT devices that support
     69      * Personal Area Networking User (PANU) profile
     70      */
     71     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;
     74 }
     75