Panagiotis Triantafyllou

version 4.5.4.1

...@@ -2,7 +2,7 @@ apply plugin: 'com.android.library' ...@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
2 2
3 ext { 3 ext {
4 PUBLISH_GROUP_ID = 'ly.warp' 4 PUBLISH_GROUP_ID = 'ly.warp'
5 - PUBLISH_VERSION = '4.5.4' 5 + PUBLISH_VERSION = '4.5.4.1'
6 PUBLISH_ARTIFACT_ID = 'warply-android-sdk' 6 PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
7 } 7 }
8 8
......
...@@ -214,7 +214,11 @@ public class FCMBaseMessagingService extends FirebaseMessagingService { ...@@ -214,7 +214,11 @@ public class FCMBaseMessagingService extends FirebaseMessagingService {
214 b.setContentTitle(pc.getTitle()); 214 b.setContentTitle(pc.getTitle());
215 b.setContentText(pc.getSubtitle()); 215 b.setContentText(pc.getSubtitle());
216 b.setSubText(pc.getContent()); 216 b.setSubText(pc.getContent());
217 - b.setContentIntent(PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT)); 217 + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
218 + b.setContentIntent(PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_MUTABLE));
219 + } else {
220 + b.setContentIntent(PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT));
221 + }
218 b.setAutoCancel(true); 222 b.setAutoCancel(true);
219 b.setOngoing(true); 223 b.setOngoing(true);
220 b.setAutoCancel(true); 224 b.setAutoCancel(true);
...@@ -331,8 +335,12 @@ public class FCMBaseMessagingService extends FirebaseMessagingService { ...@@ -331,8 +335,12 @@ public class FCMBaseMessagingService extends FirebaseMessagingService {
331 builder.setOngoing(true); 335 builder.setOngoing(true);
332 336
333 newIntent.setAction(Long.toString(System.currentTimeMillis())); 337 newIntent.setAction(Long.toString(System.currentTimeMillis()));
334 - PendingIntent pi = PendingIntent.getActivity(context, uid, newIntent, 338 + PendingIntent pi;
335 - PendingIntent.FLAG_ONE_SHOT); 339 + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
340 + pi = PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_MUTABLE);
341 + } else {
342 + pi = PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT);
343 + }
336 builder.setContentIntent(pi); 344 builder.setContentIntent(pi);
337 345
338 NotificationManager nm = (NotificationManager) context 346 NotificationManager nm = (NotificationManager) context
...@@ -390,7 +398,11 @@ public class FCMBaseMessagingService extends FirebaseMessagingService { ...@@ -390,7 +398,11 @@ public class FCMBaseMessagingService extends FirebaseMessagingService {
390 b.setContentTitle(pc.getTitle()); 398 b.setContentTitle(pc.getTitle());
391 b.setContentText(pc.getSubtitle()); 399 b.setContentText(pc.getSubtitle());
392 b.setSubText(pc.getContent()); 400 b.setSubText(pc.getContent());
393 - b.setContentIntent(PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT)); 401 + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
402 + b.setContentIntent(PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_MUTABLE));
403 + } else {
404 + b.setContentIntent(PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT));
405 + }
394 b.setAutoCancel(true); 406 b.setAutoCancel(true);
395 b.setOngoing(true); 407 b.setOngoing(true);
396 b.setAutoCancel(true); 408 b.setAutoCancel(true);
...@@ -433,7 +445,12 @@ public class FCMBaseMessagingService extends FirebaseMessagingService { ...@@ -433,7 +445,12 @@ public class FCMBaseMessagingService extends FirebaseMessagingService {
433 // Do not allow sound or anything else. 445 // Do not allow sound or anything else.
434 446
435 newIntent.setAction(Long.toString(System.currentTimeMillis())); 447 newIntent.setAction(Long.toString(System.currentTimeMillis()));
436 - PendingIntent pi = PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT); 448 + PendingIntent pi;
449 + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
450 + pi = PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_MUTABLE);
451 + } else {
452 + pi = PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT);
453 + }
437 b.setContentIntent(pi); 454 b.setContentIntent(pi);
438 455
439 NotificationManager nm = (NotificationManager) context.getSystemService(NOTIFICATION_SERVICE); 456 NotificationManager nm = (NotificationManager) context.getSystemService(NOTIFICATION_SERVICE);
......
...@@ -259,7 +259,11 @@ public class HMSBaseMessagingService extends HmsMessageService { ...@@ -259,7 +259,11 @@ public class HMSBaseMessagingService extends HmsMessageService {
259 b.setContentTitle(pc.getTitle()); 259 b.setContentTitle(pc.getTitle());
260 b.setContentText(pc.getSubtitle()); 260 b.setContentText(pc.getSubtitle());
261 b.setSubText(pc.getContent()); 261 b.setSubText(pc.getContent());
262 - b.setContentIntent(PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT)); 262 + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
263 + b.setContentIntent(PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_MUTABLE));
264 + } else {
265 + b.setContentIntent(PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT));
266 + }
263 b.setAutoCancel(true); 267 b.setAutoCancel(true);
264 b.setOngoing(true); 268 b.setOngoing(true);
265 b.setAutoCancel(true); 269 b.setAutoCancel(true);
...@@ -374,8 +378,12 @@ public class HMSBaseMessagingService extends HmsMessageService { ...@@ -374,8 +378,12 @@ public class HMSBaseMessagingService extends HmsMessageService {
374 builder.setOngoing(true); 378 builder.setOngoing(true);
375 379
376 newIntent.setAction(Long.toString(System.currentTimeMillis())); 380 newIntent.setAction(Long.toString(System.currentTimeMillis()));
377 - PendingIntent pi = PendingIntent.getActivity(context, uid, newIntent, 381 + PendingIntent pi;
378 - PendingIntent.FLAG_ONE_SHOT); 382 + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
383 + pi = PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_MUTABLE);
384 + } else {
385 + pi = PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT);
386 + }
379 builder.setContentIntent(pi); 387 builder.setContentIntent(pi);
380 388
381 NotificationManager nm = (NotificationManager) context 389 NotificationManager nm = (NotificationManager) context
...@@ -433,7 +441,11 @@ public class HMSBaseMessagingService extends HmsMessageService { ...@@ -433,7 +441,11 @@ public class HMSBaseMessagingService extends HmsMessageService {
433 b.setContentTitle(pc.getTitle()); 441 b.setContentTitle(pc.getTitle());
434 b.setContentText(pc.getSubtitle()); 442 b.setContentText(pc.getSubtitle());
435 b.setSubText(pc.getContent()); 443 b.setSubText(pc.getContent());
436 - b.setContentIntent(PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT)); 444 + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
445 + b.setContentIntent(PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_MUTABLE));
446 + } else {
447 + b.setContentIntent(PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT));
448 + }
437 b.setAutoCancel(true); 449 b.setAutoCancel(true);
438 b.setOngoing(true); 450 b.setOngoing(true);
439 b.setAutoCancel(true); 451 b.setAutoCancel(true);
...@@ -475,8 +487,12 @@ public class HMSBaseMessagingService extends HmsMessageService { ...@@ -475,8 +487,12 @@ public class HMSBaseMessagingService extends HmsMessageService {
475 // Do not allow sound or anything else. 487 // Do not allow sound or anything else.
476 488
477 newIntent.setAction(Long.toString(System.currentTimeMillis())); 489 newIntent.setAction(Long.toString(System.currentTimeMillis()));
478 - PendingIntent pi = PendingIntent.getActivity(context, uid, newIntent, 490 + PendingIntent pi;
479 - PendingIntent.FLAG_ONE_SHOT); 491 + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
492 + pi = PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_MUTABLE);
493 + } else {
494 + pi = PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT);
495 + }
480 b.setContentIntent(pi); 496 b.setContentIntent(pi);
481 497
482 NotificationManager nm = (NotificationManager) context.getSystemService(NOTIFICATION_SERVICE); 498 NotificationManager nm = (NotificationManager) context.getSystemService(NOTIFICATION_SERVICE);
......
...@@ -194,7 +194,11 @@ public abstract class WarpBaseIntentService extends GCMBaseIntentService { ...@@ -194,7 +194,11 @@ public abstract class WarpBaseIntentService extends GCMBaseIntentService {
194 b.setContentTitle(pc.getTitle()); 194 b.setContentTitle(pc.getTitle());
195 b.setContentText(pc.getSubtitle()); 195 b.setContentText(pc.getSubtitle());
196 b.setSubText(pc.getContent()); 196 b.setSubText(pc.getContent());
197 - b.setContentIntent(PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT)); 197 + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
198 + b.setContentIntent(PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_MUTABLE));
199 + } else {
200 + b.setContentIntent(PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT));
201 + }
198 b.setAutoCancel(true); 202 b.setAutoCancel(true);
199 b.setOngoing(true); 203 b.setOngoing(true);
200 b.setAutoCancel(true); 204 b.setAutoCancel(true);
...@@ -310,8 +314,12 @@ public abstract class WarpBaseIntentService extends GCMBaseIntentService { ...@@ -310,8 +314,12 @@ public abstract class WarpBaseIntentService extends GCMBaseIntentService {
310 builder.setOngoing(true); 314 builder.setOngoing(true);
311 315
312 newIntent.setAction(Long.toString(System.currentTimeMillis())); 316 newIntent.setAction(Long.toString(System.currentTimeMillis()));
313 - PendingIntent pi = PendingIntent.getActivity(context, uid, newIntent, 317 + PendingIntent pi;
314 - PendingIntent.FLAG_ONE_SHOT); 318 + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
319 + pi = PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_MUTABLE);
320 + } else {
321 + pi = PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT);
322 + }
315 builder.setContentIntent(pi); 323 builder.setContentIntent(pi);
316 324
317 NotificationManager nm = (NotificationManager) context 325 NotificationManager nm = (NotificationManager) context
...@@ -369,7 +377,11 @@ public abstract class WarpBaseIntentService extends GCMBaseIntentService { ...@@ -369,7 +377,11 @@ public abstract class WarpBaseIntentService extends GCMBaseIntentService {
369 b.setContentTitle(pc.getTitle()); 377 b.setContentTitle(pc.getTitle());
370 b.setContentText(pc.getSubtitle()); 378 b.setContentText(pc.getSubtitle());
371 b.setSubText(pc.getContent()); 379 b.setSubText(pc.getContent());
372 - b.setContentIntent(PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT)); 380 + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
381 + b.setContentIntent(PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_MUTABLE));
382 + } else {
383 + b.setContentIntent(PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT));
384 + }
373 b.setAutoCancel(true); 385 b.setAutoCancel(true);
374 b.setOngoing(true); 386 b.setOngoing(true);
375 b.setAutoCancel(true); 387 b.setAutoCancel(true);
...@@ -411,8 +423,12 @@ public abstract class WarpBaseIntentService extends GCMBaseIntentService { ...@@ -411,8 +423,12 @@ public abstract class WarpBaseIntentService extends GCMBaseIntentService {
411 // Do not allow sound or anything else. 423 // Do not allow sound or anything else.
412 424
413 newIntent.setAction(Long.toString(System.currentTimeMillis())); 425 newIntent.setAction(Long.toString(System.currentTimeMillis()));
414 - PendingIntent pi = PendingIntent.getActivity(context, uid, newIntent, 426 + PendingIntent pi;
415 - PendingIntent.FLAG_ONE_SHOT); 427 + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
428 + pi = PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_MUTABLE);
429 + } else {
430 + pi = PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT);
431 + }
416 b.setContentIntent(pi); 432 b.setContentIntent(pi);
417 433
418 NotificationManager nm = (NotificationManager) context.getSystemService(NOTIFICATION_SERVICE); 434 NotificationManager nm = (NotificationManager) context.getSystemService(NOTIFICATION_SERVICE);
......
...@@ -30,7 +30,7 @@ public class WarpConstants { ...@@ -30,7 +30,7 @@ public class WarpConstants {
30 /** 30 /**
31 * The version of the SDK installed in the device 31 * The version of the SDK installed in the device
32 */ 32 */
33 - public static final String SDK_VERSION = "4.5.4"; 33 + public static final String SDK_VERSION = "4.5.4.1";
34 34
35 /** 35 /**
36 * The URL of the server where it should ping 36 * The URL of the server where it should ping
......