1515 */
1616
1717public class Pubnub extends PubnubCoreShared {
18-
18+
1919 /**
2020 * Pubnub Constructor
2121 *
@@ -122,62 +122,62 @@ protected String getUserAgent() {
122122 "; " + android .os .Build .MODEL +
123123 " Build) PubNub-Java/Android/" + VERSION ;
124124 }
125-
126-
125+
126+
127127 /**
128128 * Enable Push Notifications (Google Cloud Messaging)
129129 * @param channel
130- * Channel for which to enable push notifications
130+ * Channel for which to enable push notifications
131131 * @param gcmRegistrationId
132- * Google Cloud Messaging registration id
132+ * Google Cloud Messaging registration id
133133 */
134134 public void enablePushNotificationsOnChannel (String channel , String gcmRegistrationId ) {
135- enablePushNotificationsOnChannels (new String []{channel }, gcmRegistrationId , null );
135+ enablePushNotificationsOnChannels (new String []{channel }, gcmRegistrationId , null );
136136 }
137-
137+
138138 /**
139139 * Enable Push Notifications (Google Cloud Messaging)
140140 * @param channels
141- * Channels for which to enable push notifications
141+ * Channels for which to enable push notifications
142142 * @param gcmRegistrationId
143- * Google Cloud Messaging registration id
143+ * Google Cloud Messaging registration id
144144 */
145145 public void enablePushNotificationsOnChannels (String [] channels , String gcmRegistrationId ) {
146- enablePushNotificationsOnChannels (channels , gcmRegistrationId , null );
146+ enablePushNotificationsOnChannels (channels , gcmRegistrationId , null );
147147 }
148-
148+
149149 /**
150150 * Enable Push Notifications (Google Cloud Messaging)
151151 * @param channel
152- * Channel for which to enable push notifications
152+ * Channel for which to enable push notifications
153153 * @param gcmRegistrationId
154- * Google Cloud Messaging registration id
154+ * Google Cloud Messaging registration id
155155 * @param callback
156- * Callback object
156+ * Callback object
157157 */
158158 public void enablePushNotificationsOnChannel (String channel , String gcmRegistrationId , Callback callback ) {
159- enablePushNotificationsOnChannels (new String []{channel }, gcmRegistrationId , callback );
159+ enablePushNotificationsOnChannels (new String []{channel }, gcmRegistrationId , callback );
160160 }
161-
161+
162162
163163 /**
164164 * Enable Push Notifications (Google Cloud Messaging)
165165 * @param channels
166- * Channels for which to enable push notifications
166+ * Channels for which to enable push notifications
167167 * @param gcmRegistrationId
168- * Google Cloud Messaging registration id
168+ * Google Cloud Messaging registration id
169169 * @param callback
170- * Callback object
170+ * Callback object
171171 */
172172 public void enablePushNotificationsOnChannels (final String [] channels , String gcmRegistrationId , final Callback callback ) {
173- final Callback cb = getWrappedCallback (callback );
174-
173+ final Callback cb = getWrappedCallback (callback );
174+
175175 Hashtable parameters = PubnubUtil .hashtableClone (params );
176176 String [] urlargs = null ;
177177 urlargs = new String []{ getPubnubUrl (), "v1" , "push" , "sub-key" ,
178178 this .SUBSCRIBE_KEY , "devices" , gcmRegistrationId
179179 };
180-
180+
181181 parameters .put ("type" , "gcm" );
182182 parameters .put ("add" , PubnubUtil .joinString (channels , "," ));
183183
@@ -203,62 +203,62 @@ public void handleError(HttpRequest hreq, PubnubError error) {
203203
204204 _request (hreq , nonSubscribeManager );
205205 }
206-
206+
207207 /**
208208 * Disable Push Notifications (Google Cloud Messaging)
209209 * @param channel
210- * Channel for which to disable push notifications
210+ * Channel for which to disable push notifications
211211 * @param gcmRegistrationId
212- * Google Cloud Messaging registration id
212+ * Google Cloud Messaging registration id
213213 */
214214 public void disablePushNotificationsOnChannel (String channel , String gcmRegistrationId ) {
215- disablePushNotificationsOnChannels (new String []{channel }, gcmRegistrationId , null );
215+ disablePushNotificationsOnChannels (new String []{channel }, gcmRegistrationId , null );
216216 }
217-
217+
218218 /**
219219 * Disable Push Notifications (Google Cloud Messaging)
220220 * @param channels
221- * Channels for which to disable push notifications
221+ * Channels for which to disable push notifications
222222 * @param gcmRegistrationId
223- * Google Cloud Messaging registration id
223+ * Google Cloud Messaging registration id
224224 */
225225 public void disablePushNotificationsOnChannels (String [] channels , String gcmRegistrationId ) {
226- disablePushNotificationsOnChannels (channels , gcmRegistrationId , null );
226+ disablePushNotificationsOnChannels (channels , gcmRegistrationId , null );
227227 }
228-
228+
229229 /**
230230 * Disable Push Notifications (Google Cloud Messaging)
231231 * @param channel
232232 * @param gcmRegistrationId
233233 * @param callback
234234 */
235235 public void disablePushNotificationsOnChannel (String channel , String gcmRegistrationId , Callback callback ) {
236- disablePushNotificationsOnChannels (new String []{channel }, gcmRegistrationId , callback );
236+ disablePushNotificationsOnChannels (new String []{channel }, gcmRegistrationId , callback );
237237 }
238-
238+
239239 /**
240240 * Disable Push Notifications (Google Cloud Messaging)
241241 * @param channel
242242 * @param callback
243243 */
244244 /**
245245 * @param channels
246- * Channels for which to disable push notifications
246+ * Channels for which to disable push notifications
247247 * @param gcmRegistrationId
248- * Google Cloud Messaging registration id
248+ * Google Cloud Messaging registration id
249249 * @param callback
250- * Callback object
250+ * Callback object
251251 */
252252 public void disablePushNotificationsOnChannels (final String [] channels , String gcmRegistrationId , final Callback callback ) {
253- final Callback cb = getWrappedCallback (callback );
253+ final Callback cb = getWrappedCallback (callback );
254+
254255
255-
256256 Hashtable parameters = PubnubUtil .hashtableClone (params );
257257 String [] urlargs = null ;
258258 urlargs = new String []{ getPubnubUrl (), "v1" , "push" , "sub-key" ,
259259 this .SUBSCRIBE_KEY , "devices" , gcmRegistrationId
260260 };
261-
261+
262262
263263 parameters .put ("type" , "gcm" );
264264 parameters .put ("remove" , PubnubUtil .joinString (channels , "," ));
@@ -286,22 +286,22 @@ public void handleError(HttpRequest hreq, PubnubError error) {
286286 _request (hreq , nonSubscribeManager );
287287 }
288288
289-
289+
290290 /**
291291 * Get channels for which push notification is enabled (Google Cloud Messaging)
292292 * @param gcmRegistrationId
293- * Google Cloud Messaging registration id
293+ * Google Cloud Messaging registration id
294294 * @param callback
295- * Callback object
295+ * Callback object
296296 */
297297 public void requestPushNotificationEnabledChannelsForDeviceRegistrationId (String gcmRegistrationId , final Callback callback ) {
298- final Callback cb = getWrappedCallback (callback );
298+ final Callback cb = getWrappedCallback (callback );
299299 Hashtable parameters = PubnubUtil .hashtableClone (params );
300300 String [] urlargs = null ;
301301 urlargs = new String []{ getPubnubUrl (), "v1" , "push" , "sub-key" ,
302302 this .SUBSCRIBE_KEY , "devices" , gcmRegistrationId
303303 };
304-
304+
305305
306306 parameters .put ("type" , "gcm" );
307307
@@ -325,31 +325,31 @@ public void handleError(HttpRequest hreq, PubnubError error) {
325325 }
326326 });
327327 }
328-
328+
329329 /**
330330 * Disable push notifications for all channels (Google Cloud Messaging)
331331 * @param gcmRegistrationId
332- * Google Cloud Messaging registration id
332+ * Google Cloud Messaging registration id
333333 */
334334 public void removeAllPushNotificationsForDeviceRegistrationId (String gcmRegistrationId ) {
335- removeAllPushNotificationsForDeviceRegistrationId (gcmRegistrationId , null );
335+ removeAllPushNotificationsForDeviceRegistrationId (gcmRegistrationId , null );
336336 }
337337
338338 /**
339339 * Disable push notifications for all channels (Google Cloud Messaging)
340340 * @param gcmRegistrationId
341- * Google Cloud Messaging registration id
341+ * Google Cloud Messaging registration id
342342 * @param callback
343- * Callback object
343+ * Callback object
344344 */
345345 public void removeAllPushNotificationsForDeviceRegistrationId (String gcmRegistrationId , final Callback callback ) {
346- final Callback cb = getWrappedCallback (callback );
346+ final Callback cb = getWrappedCallback (callback );
347347 Hashtable parameters = PubnubUtil .hashtableClone (params );
348348 String [] urlargs = null ;
349349 urlargs = new String []{ getPubnubUrl (), "v1" , "push" , "sub-key" ,
350350 this .SUBSCRIBE_KEY , "devices" , gcmRegistrationId , "remove"
351351 };
352-
352+
353353
354354 parameters .put ("type" , "gcm" );
355355
0 commit comments