Panagiotis Triantafyllou

version 4.5.4.1

......@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext {
PUBLISH_GROUP_ID = 'ly.warp'
PUBLISH_VERSION = '4.5.4'
PUBLISH_VERSION = '4.5.4.1'
PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
}
......
......@@ -214,7 +214,11 @@ public class FCMBaseMessagingService extends FirebaseMessagingService {
b.setContentTitle(pc.getTitle());
b.setContentText(pc.getSubtitle());
b.setSubText(pc.getContent());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
b.setContentIntent(PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_MUTABLE));
} else {
b.setContentIntent(PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT));
}
b.setAutoCancel(true);
b.setOngoing(true);
b.setAutoCancel(true);
......@@ -331,8 +335,12 @@ public class FCMBaseMessagingService extends FirebaseMessagingService {
builder.setOngoing(true);
newIntent.setAction(Long.toString(System.currentTimeMillis()));
PendingIntent pi = PendingIntent.getActivity(context, uid, newIntent,
PendingIntent.FLAG_ONE_SHOT);
PendingIntent pi;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
pi = PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_MUTABLE);
} else {
pi = PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT);
}
builder.setContentIntent(pi);
NotificationManager nm = (NotificationManager) context
......@@ -390,7 +398,11 @@ public class FCMBaseMessagingService extends FirebaseMessagingService {
b.setContentTitle(pc.getTitle());
b.setContentText(pc.getSubtitle());
b.setSubText(pc.getContent());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
b.setContentIntent(PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_MUTABLE));
} else {
b.setContentIntent(PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT));
}
b.setAutoCancel(true);
b.setOngoing(true);
b.setAutoCancel(true);
......@@ -433,7 +445,12 @@ public class FCMBaseMessagingService extends FirebaseMessagingService {
// Do not allow sound or anything else.
newIntent.setAction(Long.toString(System.currentTimeMillis()));
PendingIntent pi = PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT);
PendingIntent pi;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
pi = PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_MUTABLE);
} else {
pi = PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT);
}
b.setContentIntent(pi);
NotificationManager nm = (NotificationManager) context.getSystemService(NOTIFICATION_SERVICE);
......
......@@ -259,7 +259,11 @@ public class HMSBaseMessagingService extends HmsMessageService {
b.setContentTitle(pc.getTitle());
b.setContentText(pc.getSubtitle());
b.setSubText(pc.getContent());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
b.setContentIntent(PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_MUTABLE));
} else {
b.setContentIntent(PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT));
}
b.setAutoCancel(true);
b.setOngoing(true);
b.setAutoCancel(true);
......@@ -374,8 +378,12 @@ public class HMSBaseMessagingService extends HmsMessageService {
builder.setOngoing(true);
newIntent.setAction(Long.toString(System.currentTimeMillis()));
PendingIntent pi = PendingIntent.getActivity(context, uid, newIntent,
PendingIntent.FLAG_ONE_SHOT);
PendingIntent pi;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
pi = PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_MUTABLE);
} else {
pi = PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT);
}
builder.setContentIntent(pi);
NotificationManager nm = (NotificationManager) context
......@@ -433,7 +441,11 @@ public class HMSBaseMessagingService extends HmsMessageService {
b.setContentTitle(pc.getTitle());
b.setContentText(pc.getSubtitle());
b.setSubText(pc.getContent());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
b.setContentIntent(PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_MUTABLE));
} else {
b.setContentIntent(PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT));
}
b.setAutoCancel(true);
b.setOngoing(true);
b.setAutoCancel(true);
......@@ -475,8 +487,12 @@ public class HMSBaseMessagingService extends HmsMessageService {
// Do not allow sound or anything else.
newIntent.setAction(Long.toString(System.currentTimeMillis()));
PendingIntent pi = PendingIntent.getActivity(context, uid, newIntent,
PendingIntent.FLAG_ONE_SHOT);
PendingIntent pi;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
pi = PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_MUTABLE);
} else {
pi = PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT);
}
b.setContentIntent(pi);
NotificationManager nm = (NotificationManager) context.getSystemService(NOTIFICATION_SERVICE);
......
......@@ -194,7 +194,11 @@ public abstract class WarpBaseIntentService extends GCMBaseIntentService {
b.setContentTitle(pc.getTitle());
b.setContentText(pc.getSubtitle());
b.setSubText(pc.getContent());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
b.setContentIntent(PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_MUTABLE));
} else {
b.setContentIntent(PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT));
}
b.setAutoCancel(true);
b.setOngoing(true);
b.setAutoCancel(true);
......@@ -310,8 +314,12 @@ public abstract class WarpBaseIntentService extends GCMBaseIntentService {
builder.setOngoing(true);
newIntent.setAction(Long.toString(System.currentTimeMillis()));
PendingIntent pi = PendingIntent.getActivity(context, uid, newIntent,
PendingIntent.FLAG_ONE_SHOT);
PendingIntent pi;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
pi = PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_MUTABLE);
} else {
pi = PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT);
}
builder.setContentIntent(pi);
NotificationManager nm = (NotificationManager) context
......@@ -369,7 +377,11 @@ public abstract class WarpBaseIntentService extends GCMBaseIntentService {
b.setContentTitle(pc.getTitle());
b.setContentText(pc.getSubtitle());
b.setSubText(pc.getContent());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
b.setContentIntent(PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_MUTABLE));
} else {
b.setContentIntent(PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT));
}
b.setAutoCancel(true);
b.setOngoing(true);
b.setAutoCancel(true);
......@@ -411,8 +423,12 @@ public abstract class WarpBaseIntentService extends GCMBaseIntentService {
// Do not allow sound or anything else.
newIntent.setAction(Long.toString(System.currentTimeMillis()));
PendingIntent pi = PendingIntent.getActivity(context, uid, newIntent,
PendingIntent.FLAG_ONE_SHOT);
PendingIntent pi;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
pi = PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_MUTABLE);
} else {
pi = PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT);
}
b.setContentIntent(pi);
NotificationManager nm = (NotificationManager) context.getSystemService(NOTIFICATION_SERVICE);
......
......@@ -30,7 +30,7 @@ public class WarpConstants {
/**
* The version of the SDK installed in the device
*/
public static final String SDK_VERSION = "4.5.4";
public static final String SDK_VERSION = "4.5.4.1";
/**
* The URL of the server where it should ping
......