-
Notifications
You must be signed in to change notification settings - Fork 3
/
notificatication.json
112 lines (100 loc) · 2 KB
/
notificatication.json
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
//Using Curl
curl -X POST --header "Authorization: key=AIzaSyASJkL7b2Jax3-1sZXlJ5y1CllJAKrynSA" --Header "Content-Type: application/json" https://fcm.googleapis.com/fcm/send -d
{"to": "/topics/BCC",
"notification": {
"title" : " New Event",
"body" : "Title",
"sound":"default"
},
"data": {
"title" : "New event",
"body" : " Title",
"page":"EventsTabsPage"
}
}
//When using post method
Post Url = https://fcm.googleapis.com/fcm/send'
headers [ Content-Type =application/json &
Authorization = AIzaSyASJkL7b2Jax3-1sZXlJ5y1CllJAKrynSA
]
Post Body using Postman.... =(
//Events
{"to": "/topics/BCC",
"notification": {
"title" : " New Event",
"body" : "Title",
"sound":"default"
},
"data": {
"title" : "New event",
"body" : " Title",
"page":"EventsTabsPage"
}
},
//Notices
{"to": "/topics/BCC",
"notification": {
"title" : "New announcement",
"body" : "title",
"sound":"default"
},
"data": {
"title" : "New Announcement",
"body" : "title",
"page":"NoticePage"
}
}
//Livestream
{"to": "/topics/BCC",
"notification": {
"title" : "Live Broadcast",
"body" : "Churchname started a broadcast",
"sound":"default"
},
"data": {
"title" : "Live Broadcast",
"body" : "Churchname is live",
"page":"LivePage"
}
}
//Podcasts
{"to": "/topics/BCC",
"notification": {
"title" : " New Audio message",
"body" : "title",
"sound":"default"
},
"data": {
"title" : "New audio message",
"body" : "title",
"page":"AudioPage"
}
}
///Devotions
{ "to": "/topics/BCC",
"notification": {
"title" : " New Devotion",
"body" : "title",
"sound":"default"
},
"data": {
"title" : "New Devotion",
"body" : "title",
"page":"DevotionsPage"
}
}
//Projects
{
"to": "/topics/BCC",
"notification": {
"title" : " New Project Added",
"body" : "title",
"sound":"default"
},
"data": {
"title" : "New Project Added",
"body" : "title",
"page":"GiveTabs"
}
}
)