@@ -424,6 +424,7 @@ class ApsAlert(object):
424
424
Args:
425
425
title: Title of the alert (optional). If specified, overrides the title set via
426
426
``messaging.Notification``.
427
+ subtitle: Subtitle of the alert (optional).
427
428
body: Body of the alert (optional). If specified, overrides the body set via
428
429
``messaging.Notification``.
429
430
loc_key: Key of the body string in the app's string resources to use to localize the
@@ -439,9 +440,10 @@ class ApsAlert(object):
439
440
launch_image: Image for the notification action (optional).
440
441
"""
441
442
442
- def __init__ (self , title = None , body = None , loc_key = None , loc_args = None , title_loc_key = None ,
443
- title_loc_args = None , action_loc_key = None , launch_image = None ):
443
+ def __init__ (self , title = None , subtitle = None , body = None , loc_key = None , loc_args = None ,
444
+ title_loc_key = None , title_loc_args = None , action_loc_key = None , launch_image = None ):
444
445
self .title = title
446
+ self .subtitle = subtitle
445
447
self .body = body
446
448
self .loc_key = loc_key
447
449
self .loc_args = loc_args
@@ -765,6 +767,7 @@ def encode_aps_alert(cls, alert):
765
767
raise ValueError ('Aps.alert must be a string or an instance of ApsAlert class.' )
766
768
result = {
767
769
'title' : _Validators .check_string ('ApsAlert.title' , alert .title ),
770
+ 'subtitle' : _Validators .check_string ('ApsAlert.subtitle' , alert .subtitle ),
768
771
'body' : _Validators .check_string ('ApsAlert.body' , alert .body ),
769
772
'title-loc-key' : _Validators .check_string (
770
773
'ApsAlert.title_loc_key' , alert .title_loc_key ),
0 commit comments