-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathplay_games_client.proto
496 lines (494 loc) · 17.2 KB
/
play_games_client.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
/ Play Store logging protos. This is sent as a field within
// clientanalytics.proto.
syntax = "proto2";
package wireless_android_play_playlog;
option java_package = "com.google.wireless.android.play.playlog.proto";
option java_outer_classname = "PlayGames";
option optimize_for = LITE_RUNTIME;
// DEPRECATED(11/07/2013): sent by old clients. Use GenericNotificationAction
// Details about a user-visible notification sent from old clients
message PlayGamesNotificationActionDeprecated {
enum NotificationActionType {
// The notification was received on the device.
RECEIVED = 1;
// The notification was displayed to the user.
DISPLAYED = 2;
// The user saw the notification and dismissed it.
DISMISSED = 3;
// The user interacted with the notification and opened it.
OPENED = 4;
// The system chose to revoke this notification without the user seeing it.
// This could be because of action on another device, time limit, etc.
CANCELED = 5;
// This notification was consumed by another client before being displayed
// to the user.
CONSUMED = 6;
// Next index: 7;
}
// The type of action this log event represents.
optional NotificationActionType action_type = 1;
// The IDs of the notifications this action is for, if any.
repeated string notification_id = 2;
// How many notifications are being displayed to the user.
optional int32 displayed_count = 3;
// Next index: 4;
}
// Details about the user-visible android notification
message PlayGamesAndroidNotificationAction {
enum NotificationActionType {
// The notification type was unknown
UNKNOWN = 0;
// The notification was received on the device.
RECEIVED = 1;
// The notification was displayed to the user.
DISPLAYED = 2;
// The user saw the notification and dismissed it.
DISMISSED = 3;
// The user interacted with the notification and opened it.
OPENED = 4;
// The system chose to revoke this notification without the user seeing it.
// This could be because of action on another device, time limit, etc.
CANCELED = 5;
// This notification was consumed by another client before being displayed
// to the user.
CONSUMED = 6;
// Next index: 7;
}
// The type of action this log event represents.
optional NotificationActionType action_type = 1;
// The IDs of the notifications this action is for, if any.
repeated string notification_id = 2;
// How many notifications are being displayed to the user.
optional int32 displayed_count = 3;
// Next index: 4;
}
// Details about the iOS notification
message PlayGamesIosNotificationAction {
// The action the notification
enum NotificationActionType {
// The notification type was unknown
UNKNOWN = 0;
// The notification was received on the device.
APP_CONSUMED = 1;
// Next index: 2;
}
// The type of action this log event represents.
optional NotificationActionType action_type = 1;
// Next index: 2;
}
// Details about a user-visible notification
message PlayGamesGenericNotificationAction {
// The type of notification action this was
enum NotificationPlatform {
UNKNOWN = 0;
// The notification was on an android device
ANDROID = 1;
// The notification was on an iOS device
IOS = 2;
// Next index: 3;
}
// Which type of notification this was
optional NotificationPlatform action_type = 1;
// Only one of the fields below will be populated
// The Android notification details
optional PlayGamesAndroidNotificationAction android_action = 2;
// The iOS notification details
optional PlayGamesIosNotificationAction ios_action = 3;
// Next index: 4;
}
// Details about an iOS device registration
message PlayGamesIosDeviceRegister {
// 32 byte APNS device token assigned by apple.
optional bytes apns_device_token = 1;
// The iOS sdk version that sent the registration
optional string sdk_version = 2;
// The language of the device
optional string language = 3;
// Next index: 4
}
// Details about an iOS device unregistration
message PlayGamesIosDeviceUnregister {
// 32 byte APNS device token assigned by apple.
optional bytes apns_device_token = 1;
// Next index: 2
}
// Details about an iOS specific type of message
message PlayGamesIosDeviceAction {
// The type of iOS action
enum IosDeviceActionType {
UNKNOWN = 0;
// The device token was registered
REGISTER_DEVICE = 1;
// The device token was unregistered
UNREGISTER_DEVICE = 2;
// Next index: 3
}
// What type of token registration was this and
optional IosDeviceActionType action_type = 1;
// Only one of these fields will be filled depending on action_type
// The details of registration
optional PlayGamesIosDeviceRegister register_action = 2;
// The details of the unregistration
optional PlayGamesIosDeviceUnregister unregister_action = 3;
// Next index: 4;
}
// Details about the game tab in the destination app
message PlayGamesDestinationAppGameTabInfo {
// The application collection being viewed
enum ApplicationCollection {
UNKNOWN_COLLECTION = 0;
FEATURED = 1;
MULTIPLAYER = 2;
PLAYED = 3;
RECOMMENDED = 4;
DOWNLOADED = 5;
ALL_GAMES = 6;
HIDDEN_GAMES = 7;
INSTALLED = 8;
// Next index = 9
}
// The collection type being displayed
optional ApplicationCollection collection = 1;
// True if user is viewing the top of the list, false if user has scrolled
// down
optional bool top_of_list = 2;
// Tracking id for actions taken based on search / recommendations
optional string discovery_tid = 3;
// Next index: 4
}
// Details about a game purchase from the destination app
message PlayGamesDestinationAppGamePurchase {
// The price displayed to the user; null or 0 means free
optional int64 price_micros = 1;
// The purchase was successfully completed. (This only matters when
// is_start_action = false.)
optional bool has_completed_purchase = 2;
// Tracking id for actions taken based on search / recommendations
optional string discovery_tid = 3;
// How far down in search / recommendations this game was displayed.
optional uint32 ranking_position = 4;
// Next index: 5
}
// Details about a game in the destination app
message PlayGamesDestinationAppGameAction {
// Which section the user is viewing on the game detail page
enum GameDetailSection {
// UNKNOWN
UNKNOWN_SECTION = 0;
// About game
ABOUT = 1;
// The achievements for the game
ACHIEVEMENT_LIST = 2;
// The leaderboards for the game
LEADERBOARD_LIST = 3;
// Friends who also play this game
FRIEND_LIST = 4;
// Next index: 5
}
// The app id of the game
optional string application_id = 1;
// The section the user is viewing
optional GameDetailSection section = 2;
// User launched the game from the dest app
optional bool launched_game = 3;
// Leaderboard actions if the player chose a specific leaderboard
optional PlayGamesLeaderboardAction leaderboard = 4;
// User clicked to purchase game from the dest app
optional PlayGamesDestinationAppGamePurchase game_purchase = 5;
// Tracking id for actions taken based on search / recommendations
optional string discovery_tid = 6;
// How far down in search / recommendations this game was displayed.
optional uint32 ranking_position = 7;
// Next index: 8
}
// Details about the game tab in the destination app
message PlayGamesDestinationAppPlayerTabInfo {
// The application collection being viewed
enum PlayerCollection {
// Unknown default actions
UNKNOWN_COLLECTION = 0;
// List of everyone in your circles
ALL = 1;
// List of people in your circles who have recently played games
MOST_RECENT = 2;
// List of people you may know
YOU_MAY_KNOW = 3;
// Next index: 4
}
// The collection type being displayed
optional PlayerCollection collection = 1;
// True if user is viewing the top of the list, false if user has scrolled
// down
optional bool top_of_list = 2;
// Tracking id for actions taken based on search / recommendations
optional string discovery_tid = 3;
// Next index: 4
}
// Details about a player in the destination app
message PlayGamesDestinationAppPlayerAction {
// Which section the user is viewing on the player detail page
enum PlayerDetailSection {
// UNKNOWN
UNKNOWN_SECTION = 0;
// List of recently played games
RECENTLY_PLAYED = 1;
// Next index: 2
}
// The section the user is viewing
optional PlayerDetailSection section = 1;
// Tracking id for actions taken based on search / recommendations
optional string discovery_tid = 2;
// How far down in search / recommendations this game was displayed.
optional uint32 ranking_position = 3;
// Next index: 4
}
// Details about an action taken in the Settings page
message PlayGamesDestinationAppSettingsAction {
// True if the user switched accounts
optional bool switched_account = 1;
// True if the user enabled notifications, false if the user disabled
// notifications
optional bool mobile_notifications_enabled = 2;
// True if the user enabled email notifications, false if the user
// disabled email notifications
optional bool email_notifications_enabled = 3;
// True if the user enabled social sharing, false if the user
// disabled social sharing
optional bool social_sharing_enabled = 4;
// The app id that the user chose to unmute notifications
repeated string unmuted_notifications_app_id = 5;
// Next index: 6
}
// Details about a destination app action
message PlayGamesDestinationAppAction {
// The page in the destination app that the user clicked on
enum DestinationAppPageType {
// Unknown page
UNKNOWN_PAGE_TYPE = 0;
// The splash screen
SPLASH_SCREEN = 1;
// The list of games
GAME_TAB = 2;
// The list of players/friends
PLAYER_TAB = 3;
// The list of matches
MATCH_TAB = 4;
// The detail page for a game
GAME_DETAIL = 5;
// The detail page for a player
PLAYER_DETAIL = 6;
// The settings page
SETTINGS = 7;
// Launched the play store
PLAY_STORE = 8;
// Next index: 9
}
// The page the user wants to view
optional DestinationAppPageType page_type = 1;
// Details about the game tab if page_type == GAMES_TAB
optional PlayGamesDestinationAppGameTabInfo game_tab_info = 2;
// Details about an action to a specific game
optional PlayGamesDestinationAppGameAction game_action = 3;
// Details about actions inside the settings page
optional PlayGamesDestinationAppSettingsAction settings_action = 4;
// Details about the player tab if page_type == PLAYER_TAB
optional PlayGamesDestinationAppPlayerTabInfo player_tab_info = 5;
// Details about an action to a specific player
optional PlayGamesDestinationAppPlayerAction player_action = 6;
// Next index: 7
}
// Details about a leaderboard list view, top scores, or score window action
message PlayGamesLeaderboardAction {
enum LeaderboardType {
// Unknown leaderboard type
UNKNOWN_LEADERBOARD_TYPE = 0;
// Public leaderboard
PUBLIC = 1;
// Social leaderboard
SOCIAL = 2;
// Next index = 3;
}
enum ScoreWindowType {
// Unknown score window type
UNKNOWN_SCORE_WINDOW = 0;
// The "daily" score window
DAILY = 1;
// The "weekly" score window
WEEKLY = 2;
// The "all time" score window
ALL_TIME = 3;
// Next index = 4;
}
// The leaderboard id this action is requesting
optional string leaderboard_id = 1;
// The type of the leaderboard
optional LeaderboardType leaderboard_type = 2;
// The score window type requested, if applicable
optional ScoreWindowType score_window_type = 3;
// Next index = 4;
}
// Details about a GPlus upgrade action
message PlayGamesGPlusUpgrade {
enum GPlusUpgradeStatus {
// Unknown state
UNKNOWN_GPLUS_UPGRADE = 0;
// User accepted the G+ upgrade
ACCEPT = 1;
// User cancelled G+ upgrade
CANCEL = 2;
// Next index: 3
}
// Status of GPlus upgrade screen
optional GPlusUpgradeStatus state = 1;
// Next index: 2
}
// Details about the sign in account
message PlayGamesSignInAccount {
enum AccountStatus {
// Unknown account status
UNKNOWN_ACCOUNT_STATUS = 0;
// User created a new account
NEW = 1;
// Proceeded passed the sign-in without account selector because user only
// has one account
PROCEED_NO_ACCOUNT_SELECTOR = 2;
// Proceeded passed the sign-in with account selector because user has
// multiple accounts
PROCEED_WITH_ACCOUNT_SELECTOR = 3;
// User canceled account sign-in
CANCEL = 4;
// Next index: 5
}
// The status of the account sign-in
optional AccountStatus status = 1;
// Next index: 2
}
// Details of an action taken inside a game
message PlayGamesInGameAction {
enum GameActionType {
// Unknown action
UNKNOWN_GAME_ACTION = 0;
// User viewed the achievement list
ACHIEVEMENT_LIST = 1;
// User viewed the leaderboard list
LEADERBOARD_LIST = 2;
// User viewed a leaderboard top score
LEADERBOARD_TOP_SCORES = 3;
// User viewed a leaderboard score window
LEADERBOARD_SCORE_WINDOW = 4;
// User viewed game settings
SETTINGS = 5;
// User signed out of a game
SIGN_OUT = 6;
// User viewed the select opponents UI
SELECT_OPPONENTS = 7;
// User viewed the player search UI
PLAYER_SEARCH = 8;
// User viewed the waiting room UI
WAITING_ROOM = 9;
// User viewed the multiplayer inbox UI
MULTIPLAYER_INBOX = 10;
// User viewed the send request UI
SEND_REQUEST = 11;
// User viewed the request inbox UI
REQUEST_INBOX = 12;
// Next index: 13
}
// The action type
optional GameActionType type = 1;
// Leaderboard action, populated if one of the leaderboard game actions
// were taken by the user
optional PlayGamesLeaderboardAction leaderboard = 2;
// Next index: 3
}
// Details of a sign-in action
message PlayGamesSignInAction {
enum SignInActionType {
// Unknown action
UNKNOWN_SIGN_IN_ACTION = 0;
// Games service connection attempt
// Sent whenever a game attempts to connect to the games service.
CONNECTION_START = 1;
// Sign in required
// Sent when a game was sent the SIGN_IN_REQUIRED result.
SIGN_IN_REQUIRED = 2;
// Connection success
// Sent when a game successfully connects to the games service.
CONNECTION_SUCCESS = 3;
// Next index: 4
}
// The account selector screen
optional PlayGamesSignInAccount account = 1;
// The G+ upgrade screen
optional PlayGamesGPlusUpgrade gplus_upgrade = 2;
// The type of action this event represents
optional SignInActionType type = 3;
// Next index: 4
}
// Details of a circle-modification action
message PlayGamesModifyCirclesAction {
enum CircleActionSource {
// Unknown circle source
UNKNOWN = 0;
// Participant list
PARTICIPANT_LIST = 1;
// Recently played players
RECENTLY_PLAYED_PLAYERS = 2;
// Player search
PLAYER_SEARCH = 3;
// Player detail
PLAYER_DETAIL = 4;
// "You may know" list (player screen)
YOU_MAY_KNOW_LIST_PLAYERS = 5;
// "You may know" list (homescreen)
YOU_MAY_KNOW_LIST_HOMESCREEN = 6;
// Next index: 7
}
// The source of the modification action
optional CircleActionSource source = 1;
// Whether or not the player was added to circles
optional bool added = 2;
// Next index: 3
}
// Details about the request
message PlayGamesRequestInfo {
// True if the action indicates the start of the request, false if the action
// indicates the end of the request. This field is necessary only when we
// care about the latency of this action. In order to accurately calculate
// latency, also include the start_timestamp_millis field below.
optional bool is_start_action = 1;
// The 3P application id making the request
optional string application_id = 2;
// The start timestamp that should be logged if we care about latency of this
// action. Should only be logged if is_start_action = false. This should
// correspond to the PlaylogLogProto timestamp_millis field so that we can
// later Dremel the start and stop log events.
optional int64 start_timestamp_millis = 3;
// The instance ID of the application making the request. On Android, this
// will be a package name. On iOS, this will be the bundle identifier.
optional string instance_id = 4;
// Version of the client SDK that sent this request.
optional string client_version = 5;
// Next index: 6;
}
// A Play Games log event
message PlayGamesLogEvent {
// General info about the request. Every action should log this field.
optional PlayGamesRequestInfo request_info = 1;
// A user sign-in action
optional PlayGamesSignInAction sign_in = 2;
// An action that occurs within a game
optional PlayGamesInGameAction in_game = 3;
// An action that occurs within the games destination app
optional PlayGamesDestinationAppAction dest_app = 4;
// DEPRECATED(11/07/2013): action only sent by old clients. Instead use
// generic_notification.
optional PlayGamesNotificationActionDeprecated notification = 5;
// Notification action used by all clients
optional PlayGamesGenericNotificationAction generic_notification = 6;
// An iOS device registration/unregistration action
optional PlayGamesIosDeviceAction ios_action = 7;
// Action logged when modifying the state of the user's circles
optional PlayGamesModifyCirclesAction modify_circles = 8;
// Next index: 9
}