1 /* 2 * Copyright (C) 2011 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 18 package android.bluetooth; 19 20 import android.annotation.NonNull; 21 import android.os.Parcel; 22 import android.os.Parcelable; 23 24 /** 25 * The Bluetooth Health Application Configuration that is used in conjunction with 26 * the {@link BluetoothHealth} class. This class represents an application configuration 27 * that the Bluetooth Health third party application will register to communicate with the 28 * remote Bluetooth health device. 29 * 30 * @deprecated Health Device Profile (HDP) and MCAP protocol are no longer used. New 31 * apps should use Bluetooth Low Energy based solutions such as {@link BluetoothGatt}, 32 * {@link BluetoothAdapter#listenUsingL2capChannel()(int)}, or 33 * {@link BluetoothDevice#createL2capChannel(int)} 34 */ 35 @Deprecated 36 public final class BluetoothHealthAppConfiguration implements Parcelable { 37 38 /** 39 * Hide auto-created default constructor 40 * @hide 41 */ BluetoothHealthAppConfiguration()42 BluetoothHealthAppConfiguration() {} 43 44 @Override describeContents()45 public int describeContents() { 46 return 0; 47 } 48 49 /** 50 * Return the data type associated with this application configuration. 51 * 52 * @return dataType 53 * 54 * @deprecated Health Device Profile (HDP) and MCAP protocol are no longer used. New 55 * apps should use Bluetooth Low Energy based solutions such as {@link BluetoothGatt}, 56 * {@link BluetoothAdapter#listenUsingL2capChannel()(int)}, or 57 * {@link BluetoothDevice#createL2capChannel(int)} 58 */ 59 @Deprecated getDataType()60 public int getDataType() { 61 return 0; 62 } 63 64 /** 65 * Return the name of the application configuration. 66 * 67 * @return String name 68 * 69 * @deprecated Health Device Profile (HDP) and MCAP protocol are no longer used. New 70 * apps should use Bluetooth Low Energy based solutions such as {@link BluetoothGatt}, 71 * {@link BluetoothAdapter#listenUsingL2capChannel()(int)}, or 72 * {@link BluetoothDevice#createL2capChannel(int)} 73 */ 74 @Deprecated getName()75 public String getName() { 76 return null; 77 } 78 79 /** 80 * Return the role associated with this application configuration. 81 * 82 * @return One of {@link BluetoothHealth#SOURCE_ROLE} or {@link BluetoothHealth#SINK_ROLE} 83 * 84 * @deprecated Health Device Profile (HDP) and MCAP protocol are no longer used. New 85 * apps should use Bluetooth Low Energy based solutions such as {@link BluetoothGatt}, 86 * {@link BluetoothAdapter#listenUsingL2capChannel()(int)}, or 87 * {@link BluetoothDevice#createL2capChannel(int)} 88 */ 89 @Deprecated getRole()90 public int getRole() { 91 return 0; 92 } 93 94 /** 95 * @deprecated Health Device Profile (HDP) and MCAP protocol are no longer used. New 96 * apps should use Bluetooth Low Energy based solutions such as {@link BluetoothGatt}, 97 * {@link BluetoothAdapter#listenUsingL2capChannel()(int)}, or 98 * {@link BluetoothDevice#createL2capChannel(int)} 99 */ 100 @Deprecated 101 @NonNull 102 public static final Creator<BluetoothHealthAppConfiguration> CREATOR = new Creator<>() { 103 @Override 104 public BluetoothHealthAppConfiguration createFromParcel(Parcel in) { 105 return new BluetoothHealthAppConfiguration(); 106 } 107 108 @Override 109 public BluetoothHealthAppConfiguration[] newArray(int size) { 110 return new BluetoothHealthAppConfiguration[size]; 111 } 112 }; 113 114 @Override writeToParcel(Parcel out, int flags)115 public void writeToParcel(Parcel out, int flags) {} 116 } 117