• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RPCs for the Nearby Console service.
2syntax = "proto3";
3
4package service.proto;
5// Response containing an observed device.
6message GetObservedDeviceResponse {
7  // The device from the request.
8  Device device = 1;
9
10  // The image icon that shows in the notification
11  bytes image = 3;
12
13  // Strings to be displayed on notifications during the pairing process.
14  ObservedDeviceStrings strings = 4;
15
16  reserved 2;
17}
18
19message Device {
20  // Output only. The server-generated ID of the device.
21  int64 id = 1;
22
23  // The pantheon project number the device is created under. Only Nearby admins
24  // can change this.
25  int64 project_number = 2;
26
27  // How the notification will be displayed to the user
28  NotificationType notification_type = 3;
29
30  // The image to show on the notification.
31  string image_url = 4;
32
33  // The name of the device.
34  string name = 5;
35
36  // The intent that will be launched via the notification.
37  string intent_uri = 6;
38
39  // The transmit power of the device's BLE chip.
40  int32 ble_tx_power = 7;
41
42  // The distance that the device must be within to show a notification.
43  // If no distance is set, we default to 0.6 meters. Only Nearby admins can
44  // change this.
45  float trigger_distance = 8;
46
47  // Output only. Fast Pair only - The anti-spoofing key pair for the device.
48  AntiSpoofingKeyPair anti_spoofing_key_pair = 9;
49
50  // Output only. The current status of the device.
51  Status status = 10;
52
53
54  // DEPRECATED - check for published_version instead.
55  // Output only.
56  // Whether the device has a different, already published version.
57  bool has_published_version = 12;
58
59  // Fast Pair only - The type of device being registered.
60  DeviceType device_type = 13;
61
62
63  // Fast Pair only - Additional images for true wireless headsets.
64  TrueWirelessHeadsetImages true_wireless_images = 15;
65
66  // Fast Pair only - When true, this device can support assistant function.
67  bool assistant_supported = 16;
68
69  // Output only.
70  // The published version of a device that has been approved to be displayed
71  // as a notification - only populated if the device has a different published
72  // version. (A device that only has a published version would not have this
73  // populated).
74  Device published_version = 17;
75
76  // Fast Pair only - When true, Fast Pair will only create a bond with the
77  // device and not attempt to connect any profiles (for example, A2DP or HFP).
78  bool data_only_connection = 18;
79
80  // Name of the company/brand that will be selling the product.
81  string company_name = 19;
82
83  repeated FastPairFeature features = 20;
84
85  // Name of the device that is displayed on the console.
86  string display_name = 21;
87
88  // How the device will be interacted with by the user when the scan record
89  // is detected.
90  InteractionType interaction_type = 22;
91
92  // Companion app information.
93  CompanionAppDetails companion_detail = 23;
94
95  reserved 11, 14;
96}
97
98
99// Represents the format of the final device notification (which is directly
100// correlated to the action taken by the notification).
101enum NotificationType {
102  // Unspecified notification type.
103  NOTIFICATION_TYPE_UNSPECIFIED = 0;
104  // Notification launches the fast pair intent.
105  // Example Notification Title: "Bose SoundLink II"
106  // Notification Description: "Tap to pair with this device"
107  FAST_PAIR = 1;
108  // Notification launches an app.
109  // Notification Title: "[X]" where X is type/name of the device.
110  // Notification Description: "Tap to setup this device"
111  APP_LAUNCH = 2;
112  // Notification launches for Nearby Setup. The notification title and
113  // description is the same as APP_LAUNCH.
114  NEARBY_SETUP = 3;
115  // Notification launches the fast pair intent, but doesn't include an anti-
116  // spoofing key. The notification title and description is the same as
117  // FAST_PAIR.
118  FAST_PAIR_ONE = 4;
119  // Notification launches Smart Setup on devices.
120  // These notifications are identical to APP_LAUNCH except that they always
121  // launch Smart Setup intents within GMSCore.
122  SMART_SETUP = 5;
123}
124
125// How the device will be interacted with when it is seen.
126enum InteractionType {
127  INTERACTION_TYPE_UNKNOWN = 0;
128  AUTO_LAUNCH = 1;
129  NOTIFICATION = 2;
130}
131
132// Features that can be enabled for a Fast Pair device.
133enum FastPairFeature {
134  FAST_PAIR_FEATURE_UNKNOWN = 0;
135  SILENCE_MODE = 1;
136  WIRELESS_CHARGING = 2;
137  DYNAMIC_BUFFER_SIZE = 3;
138  NO_PERSONALIZED_NAME = 4;
139  EDDYSTONE_TRACKING = 5;
140}
141
142message CompanionAppDetails {
143  // Companion app slice provider's authority.
144  string authority = 1;
145
146  // Companion app certificate value.
147  string certificate_hash = 2;
148
149  // Deprecated fields.
150  reserved 3;
151}
152
153// Additional images for True Wireless Fast Pair devices.
154message TrueWirelessHeadsetImages {
155  // Image URL for the left bud.
156  string left_bud_url = 1;
157
158  // Image URL for the right bud.
159  string right_bud_url = 2;
160
161  // Image URL for the case.
162  string case_url = 3;
163}
164
165// Represents the type of device that is being registered.
166enum DeviceType {
167  DEVICE_TYPE_UNSPECIFIED = 0;
168  HEADPHONES = 1;
169  SPEAKER = 2;
170  WEARABLE = 3;
171  INPUT_DEVICE = 4;
172  AUTOMOTIVE = 5;
173  OTHER = 6;
174  TRUE_WIRELESS_HEADPHONES = 7;
175  WEAR_OS = 8;
176  ANDROID_AUTO = 9;
177}
178
179// An anti-spoofing key pair for a device that allows us to verify the device is
180// broadcasting legitimately.
181message AntiSpoofingKeyPair {
182  // The private key (restricted to only be viewable by trusted clients).
183  bytes private_key = 1;
184
185  // The public key.
186  bytes public_key = 2;
187}
188
189// Various states that a customer-configured device notification can be in.
190// PUBLISHED is the only state that shows notifications to the public.
191message Status {
192  // Status types available for each device.
193  enum StatusType {
194    // Unknown status.
195    TYPE_UNSPECIFIED = 0;
196    // Drafted device.
197    DRAFT = 1;
198    // Submitted and waiting for approval.
199    SUBMITTED = 2;
200    // Fully approved and available for end users.
201    PUBLISHED = 3;
202    // Rejected and not available for end users.
203    REJECTED = 4;
204  }
205
206  // Details about a device that has been rejected.
207  message RejectionDetails {
208    // The reason for the rejection.
209    enum RejectionReason {
210      // Unspecified reason.
211      REASON_UNSPECIFIED = 0;
212      // Name is not valid.
213      NAME = 1;
214      // Image is not valid.
215      IMAGE = 2;
216      // Tests have failed.
217      TESTS = 3;
218      // Other reason.
219      OTHER = 4;
220    }
221
222    // A list of reasons the device was rejected.
223    repeated RejectionReason reasons = 1;
224    // Comment about an OTHER rejection reason.
225    string additional_comment = 2;
226  }
227
228  // The status of the device.
229  StatusType status_type = 1;
230
231  // Accompanies Status.REJECTED.
232  RejectionDetails rejection_details = 2;
233}
234
235// Strings to be displayed in notifications surfaced for a device.
236message ObservedDeviceStrings {
237  // The notification description for when the device is initially discovered.
238  string initial_notification_description = 2;
239
240  // The notification description for when the device is initially discovered
241  // and no account is logged in.
242  string initial_notification_description_no_account = 3;
243
244  // The notification description for once we have finished pairing and the
245  // companion app has been opened. For google assistant devices, this string will point
246  // users to setting up the assistant.
247  string open_companion_app_description = 4;
248
249  // The notification description for once we have finished pairing and the
250  // companion app needs to be updated before use.
251  string update_companion_app_description = 5;
252
253  // The notification description for once we have finished pairing and the
254  // companion app needs to be installed.
255  string download_companion_app_description = 6;
256
257  // The notification title when a pairing fails.
258  string unable_to_connect_title = 7;
259
260  // The notification summary when a pairing fails.
261  string unable_to_connect_description = 8;
262
263  // The description that helps user initially paired with device.
264  string initial_pairing_description = 9;
265
266  // The description that let user open the companion app.
267  string connect_success_companion_app_installed = 10;
268
269  // The description that let user download the companion app.
270  string connect_success_companion_app_not_installed = 11;
271
272  // The description that reminds user there is a paired device nearby.
273  string subsequent_pairing_description = 12;
274
275  // The description that reminds users opt in their device.
276  string retroactive_pairing_description = 13;
277
278  // The description that indicates companion app is about to launch.
279  string wait_launch_companion_app_description = 14;
280
281  // The description that indicates go to bluetooth settings when connection
282  // fail.
283  string fail_connect_go_to_settings_description = 15;
284
285  reserved 1, 16, 17, 18, 19, 20, 21, 22, 23, 24;
286}
287
288// The buffer size range of a Fast Pair devices support dynamic buffer size.
289message BufferSizeRange {
290  // The max buffer size in ms.
291  int32 max_size = 1;
292
293  // The min buffer size in ms.
294  int32 min_size = 2;
295
296  // The default buffer size in ms.
297  int32 default_size = 3;
298
299  // The codec of this buffer size range.
300  int32 codec = 4;
301}
302