• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rj76 / fcm-rust / 9243346163

26 May 2024 12:43PM UTC coverage: 4.501% (-0.7%) from 5.242%
9243346163

Pull #10

github

web-flow
Merge dc15c8925 into cd7323ced
Pull Request #10: Major update

284 of 37868 branches covered (0.75%)

Branch coverage included in aggregate %.

79 of 365 new or added lines in 22 files covered. (21.64%)

8735 existing lines in 136 files now uncovered.

15848 of 320575 relevant lines covered (4.94%)

234.5 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/android/android_notification.rs
1
use serde::Serialize;
2

3
use super::{
4
    light_settings::LightSettings,
5
    notification_priority::NotificationPriority,
6
    visibility::Visibility,
7
};
8

NEW
9
#[derive(Debug, Default, Serialize)]
×
10
/// <https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages?authuser=0#androidnotification>
11
pub struct AndroidNotification {
12
    /// The notification's title.
13
    #[serde(skip_serializing_if = "Option::is_none")]
UNCOV
14
    pub title: Option<String>,
×
15

16
    /// The notification's body text.
17
    #[serde(skip_serializing_if = "Option::is_none")]
UNCOV
18
    pub body: Option<String>,
×
19

20
    /// The notification's icon.
21
    #[serde(skip_serializing_if = "Option::is_none")]
UNCOV
22
    pub icon: Option<String>,
×
23

24
    /// The notification's icon color, expressed in #rrggbb format.
25
    #[serde(skip_serializing_if = "Option::is_none")]
UNCOV
26
    pub color: Option<String>,
×
27

28
    /// The sound to play when the device receives the notification.
29
    #[serde(skip_serializing_if = "Option::is_none")]
UNCOV
30
    pub sound: Option<String>,
×
31

32
    /// Identifier used to replace existing notifications in the notification drawer.
33
    #[serde(skip_serializing_if = "Option::is_none")]
UNCOV
34
    pub tag: Option<String>,
×
35

36
    /// The action associated with a user click on the notification.
37
    #[serde(skip_serializing_if = "Option::is_none")]
UNCOV
38
    pub click_action: Option<String>,
×
39

40
    /// The key to the body string in the app's string resources to use to localize the body text to the user's
41
    /// current localization.
42
    #[serde(skip_serializing_if = "Option::is_none")]
UNCOV
43
    pub body_loc_key: Option<String>,
×
44

45
    /// Variable string values to be used in place of the format specifiers in body_loc_key to use to localize the
46
    /// body text to the user's current localization.
47
    #[serde(skip_serializing_if = "Option::is_none")]
UNCOV
48
    pub body_loc_args: Option<Vec<String>>,
×
49

50
    /// The key to the title string in the app's string resources to use to localize the title text to the user's
51
    /// current localization.
52
    #[serde(skip_serializing_if = "Option::is_none")]
UNCOV
53
    pub title_loc_key: Option<String>,
×
54

55
    /// Variable string values to be used in place of the format specifiers in title_loc_key to use to localize the
56
    /// title text to the user's current localization.
57
    #[serde(skip_serializing_if = "Option::is_none")]
UNCOV
58
    pub title_loc_args: Option<Vec<String>>,
×
59

60
    /// The notification's channel id (new in Android O).
61
    #[serde(skip_serializing_if = "Option::is_none")]
UNCOV
62
    pub channel_id: Option<String>,
×
63

64
    /// Sets the "ticker" text, which is sent to accessibility services.
65
    #[serde(skip_serializing_if = "Option::is_none")]
UNCOV
66
    pub ticker: Option<String>,
×
67

68
    /// When set to false or unset, the notification is automatically dismissed when the user clicks it in the panel.
69
    #[serde(skip_serializing_if = "Option::is_none")]
UNCOV
70
    pub sticky: Option<bool>,
×
71

72
    /// Set the time that the event in the notification occurred. Notifications in the panel are sorted by this time.
73
    /// Timestamp format: <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf?authuser=0#google.protobuf.Timestamp>
74
    #[serde(skip_serializing_if = "Option::is_none")]
UNCOV
75
    pub event_time: Option<String>,
×
76

77
    /// Set whether or not this notification is relevant only to the current device.
78
    #[serde(skip_serializing_if = "Option::is_none")]
UNCOV
79
    pub local_only: Option<bool>,
×
80

81
    /// Set the relative priority for this notification.
82
    #[serde(skip_serializing_if = "Option::is_none")]
UNCOV
83
    pub notification_priority: Option<NotificationPriority>,
×
84

85
    /// If set to true, use the Android framework's default sound for the notification.
86
    #[serde(skip_serializing_if = "Option::is_none")]
UNCOV
87
    pub default_sound: Option<bool>,
×
88

89
    /// If set to true, use the Android framework's default vibrate pattern for the notification.
90
    #[serde(skip_serializing_if = "Option::is_none")]
UNCOV
91
    pub default_vibrate_timings: Option<bool>,
×
92

93
    /// If set to true, use the Android framework's default LED light settings for the notification.
94
    #[serde(skip_serializing_if = "Option::is_none")]
UNCOV
95
    pub default_light_settings: Option<bool>,
×
96

97
    /// Set the vibration pattern to use
98
    /// Duration format: <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf?authuser=0#google.protobuf.Duration>
99
    #[serde(skip_serializing_if = "Option::is_none")]
UNCOV
100
    pub vibrate_timings: Option<Vec<String>>,
×
101

102
    /// Set the Notification.visibility of the notification.
103
    #[serde(skip_serializing_if = "Option::is_none")]
UNCOV
104
    pub visibility: Option<Visibility>,
×
105

106
    /// Sets the number of items this notification represents.
107
    #[serde(skip_serializing_if = "Option::is_none")]
UNCOV
108
    pub notification_count: Option<i32>,
×
109

110
    /// Settings to control the notification's LED blinking rate and color if LED is available on the device.
111
    #[serde(skip_serializing_if = "Option::is_none")]
UNCOV
112
    pub light_settings: Option<LightSettings>,
×
113

114
    /// Contains the URL of an image that is going to be displayed in a notification.
115
    #[serde(skip_serializing_if = "Option::is_none")]
UNCOV
116
    pub image: Option<String>,
×
117
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc