-
Notifications
You must be signed in to change notification settings - Fork 0
/
app-detail.html
251 lines (209 loc) · 10.9 KB
/
app-detail.html
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
<!DOCTYPE html>
<!--[if IE 8]><html class="ie8"><![endif]-->
<!--[if IE 9]><html class="ie9"><![endif]-->
<!--[if gt IE 9]><!-->
<html>
<!--<![endif]-->
<head>
<title>AeroGear UnifiedPush Server</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8">
<link rel="shortcut icon" href="../dist/img/favicon.ico">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="../dist/img/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="../dist/img/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="../dist/img/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="../dist/img/apple-touch-icon-57-precomposed.png">
<link href="css/styles.css" rel="stylesheet" media="screen, print">
<!-- <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> -->
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="bower_components/patternfly/components/html5shiv/dist/html5shiv.min.js"></script>
<script src="bower_components/patternfly/components/respond/dest/respond.min.js"></script>
<![endif]-->
<!-- IE8 requires jQuery and Bootstrap JS to load in head to prevent rendering bugs -->
<!-- IE8 requires jQuery v1.x -->
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="bower_components/patternfly/components/bootstrap/dist/js/bootstrap.min.js"></script>
<script type="text/javascript" src="bower_components/patternfly/components/datatables/media/js/jquery.dataTables.js"></script>
<script type="text/javascript" src="bower_components/patternfly/components/bootstrap-select/bootstrap-select.min.js"></script>
<script type="text/javascript" src="bower_components/patternfly/dist/js/patternfly.min.js"></script>
<script type="text/javascript" src="bower_components/google-code-prettify/bin/prettify.min.js"></script>
<script type="text/javascript" src="js/script.js"></script>
</head>
<body>
<nav class="navbar navbar-default navbar-pf" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">
<img src="img/brand.svg" alt="Aerogear" />
</a>
</div>
<div class="collapse navbar-collapse navbar-collapse-1">
<ul class="nav navbar-nav navbar-utility">
<li class="dropdown">
<a href="#" data-toggle="dropdown">
<span class="pficon pficon-info"></span>
Warnings: <strong>2</strong>
</a>
<div class="dropdown-menu infotip bottom-right">
<div class="arrow"></div>
<ul class="list-group">
<li class="list-group-item">
<span class="i pficon pficon-info"></span>
Added Datasources TestDS
</li>
<li class="list-group-item">
<span class="i pficon pficon-info"></span>
Modified Datasources ExampleDS
</li>
</ul>
<div class="footer"><a href="#">Clear Warnings</a></div>
</div>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<span class="pficon pficon-user"></span>
Brian Johnson <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="#">Accont management</a>
</li>
<li class="divider"></li>
<li>
<a href="#">Logout</a>
</li>
</ul>
</li>
</ul>
</div>
<div class="collapse navbar-collapse navbar-collapse-1">
</div>
</nav>
<div class="container-fluid">
<div class="row">
<div class="col-sm-8 col-md-9">
<ol class="breadcrumb">
<li><a href="index.html">Applications</a></li>
<li><strong>Application One:</strong> Sender API</li>
</ol>
<div class="ups-app-header">
<div class="actions pull-right ups-send-btn" tabindex="0" disabled="disabled" role="button" data-placement="bottom" data-toggle="popover" data-trigger="focus" title="Not yet..." data-content="To send test notifications go and set your first variable.">
<button class="btn btn-default" disabled="disabled"><i class="fa fa-paper-plane"></i> Send Notification to this app</button>
</div>
<h1>Application One</h1>
</div><!-- app header -->
<ul class="nav nav-tabs">
<li><a href="app-detail-variants.html">Variants</a></li>
<li class="active"><a href="#">Sender API</a></li>
<li><a href="app-detail-log.html">Activity log</a></li>
</ul>
<h3>Sending push notifications</h3>
<p>Make your backend server send push notifications through this UnifiedPush Server using <a target="_blank" href="https://aerogear.org/docs/unifiedpush/GetStartedwithJavaSender/">Aerogears Java sender API</a>:</p>
<dl class="dl-horizontal">
<dt>Server URL</dt>
<dd>http://localhost:8080/ag-push/</dd>
<dt>Application ID</dt>
<dd>bff6aeb2-6b30-4967-bf0a-9a99d0873a63</dd>
<dt>Master Secret</dt>
<dd>be608987-a0db-458e-b5cd-62200ed006a8
<br /><a href="#" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#myModal"><span class="pficon pficon-refresh"></span> Renew Master Secret</a>
</dd>
</dl>
<div class="alert alert-info">
<span class="pficon pficon-info"></span>
<strong>Keep this info secure!</strong> Never publish your Master Secret or Application ID. <a href="#" class="alert-link">Read more info about this</a>.
</div>
<ul class="nav nav-tabs nav-tabs-pf">
<li class="active"><a href="#">Java Sender API</a></li>
<li><a href="#">Node.js Sender API</a></li>
<li><a href="#">CURL Sender API</a></li>
</ul>
<h3>Set up Java UPS Sender API</h3>
<p>You can send notifications to your apps following this 2 stpes. First, on your backend, set up <a target="_blank" href="#">UnifiedPush Server</a>. Second, <a href="#">add a variant</a> and use the snippet on your mobile app to <a href="#">register you device</a>. You can add as many variants as needed. (TODO: improve this text and add links to docs)</p>
<div class="ups-snippet">
<a href="#" data-toggle="tooltip" data-placement="left" title="Copy to clipboard">Copy</a>
<pre class="pre-scrollable prettyprint">
JavaSender defaultJavaSender = new SenderClient.Builder("http://localhost:8080/ag-push/").build();
UnifiedMessage unifiedMessage = new UnifiedMessage.Builder()
.pushApplicationId("bff6aeb2-6b30-4967-bf0a-9a99d0873a63")
.masterSecret("be608987-a0db-458e-b5cd-62200ed006a8")
.alert("Hello from Java Sender API!")
.build();
defaultJavaSender.send(unifiedMessage, new MessageResponseCallback() {
@Override
public void onComplete(int statusCode) {
//do cool stuff
}
@Override
public void onError(Throwable throwable) {
//bring out the bad news
}
});
</pre>
</div>
<h3>Next step:</h3>
<p>This only appears if there are no devices installed on any variant. If you haven't done it yet, the first step to set up your mobile device is to click on Variants and <a href="#">add a variant</a>. Once you get the variant snippet go and <a target="_blank" href="#">register you device</a>.</p>
</div><!-- /col -->
<div class="col-sm-4 col-md-3 sidebar-pf sidebar-pf-right">
<div class="sidebar-header sidebar-header-bleed-left sidebar-header-bleed-right">
<h2 class="h5">App Statistics</h2>
</div>
<ul class="list-unstyled ups-statistics">
<li><span>8</span>Variants</li>
<li><span>825</span>Delivered</li>
<li><span>52</span>Devices</li>
</ul>
<div class="sidebar-header sidebar-header-bleed-left sidebar-header-bleed-right">
<h2 class="h5">App Notifications</h2>
</div>
<div class="list-group">
<a href="app-detail-log.html" class="list-group-item">
<h3 class="list-group-item-heading">Application name</h3>
<p class="list-group-item-text">29 Dec, 12:12:30, 2014</p>
</a>
<a href="app-detail-log.html" class="list-group-item">
<h3 class="list-group-item-heading">Application name</h3>
<p class="list-group-item-text">29 Dec, 12:12:30, 2014</p>
</a>
<a href="app-detail-log.html" class="list-group-item">
<h3 class="list-group-item-heading">Application name</h3>
<p class="list-group-item-text">29 Dec, 12:12:30, 2014</p>
</a>
<a href="app-detail-log.html" class="list-group-item">
<h3 class="list-group-item-heading">Application name</h3>
<p class="list-group-item-text">29 Dec, 12:12:30, 2014</p>
</a>
</div>
<p><a href="#"><span class="pficon pficon-history"></span> See all notifications</a></p>
</div><!-- /col -->
</div><!-- /row -->
</div><!-- /container -->
<div class="modal" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<span class="pficon pficon-close"></span>
</button>
<h4 class="modal-title" id="myModalLabel">Renew Master Secret</h4>
</div>
<div class="modal-body">
<h4>You are about to change the master secret!</h4>
<p>Be aware that this cannot be undone and you'll have to change your sender in order to continue sending push notifications.</p>
<p>Are you sure you want to prosigue?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">No, cancel</button>
<a href="wizard03.html" class="btn btn-danger">Yes, Renew Master Secret</a>
</div>
</div>
</div>
</div>
</body>
</html>