Panagiotis Triantafyllou

heads up notificaitons

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 33
......
{
"project_info": {
"project_number": "674046222598",
"project_id": "warply-sdk",
"storage_bucket": "warply-sdk.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:674046222598:android:3a7e0c274fc46ec10cbe87",
"android_client_info": {
"package_name": "warp.ly.android_sdk"
}
},
"oauth_client": [
{
"client_id": "674046222598-rjlqo8cq92ctmitg8nuf7qpvlg7itddg.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyA1dTyKyZF3ic_i0PMtk_hdYs_NaGzx4V8"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "674046222598-rjlqo8cq92ctmitg8nuf7qpvlg7itddg.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}
\ No newline at end of file
......@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext {
PUBLISH_GROUP_ID = 'ly.warp'
PUBLISH_VERSION = '4.5.5.1'
PUBLISH_VERSION = '4.5.5.2'
PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
}
......
......@@ -204,20 +204,15 @@ public class FCMBaseMessagingService extends FirebaseMessagingService {
b.setStyle(inboxStyle);
}
b.setDefaults(Notification.DEFAULT_VIBRATE | Notification.DEFAULT_LIGHTS);
b.setDefaults(Notification.DEFAULT_VIBRATE | Notification.DEFAULT_LIGHTS | Notification.DEFAULT_SOUND);
b.setTicker(pc.getTicker());
b.setChannelId(CHANNEL_ID);
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);
b.setPriority(Notification.PRIORITY_MAX);
b.setSmallIcon(WarplyProperty.getPushIconResId(context));
b.setLargeIcon(loadDrawable(pc.getImageUrl()));
......@@ -252,23 +247,30 @@ public class FCMBaseMessagingService extends FirebaseMessagingService {
}
}
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 | PendingIntent.FLAG_MUTABLE);
}
b.setContentIntent(pi);
// b.setFullScreenIntent(pi, true);
NotificationManager nm = (NotificationManager) context.getSystemService(NOTIFICATION_SERVICE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && nm != null) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
NotificationChannel notificationChannel = new NotificationChannel(CHANNEL_ID, "notification_channel", NotificationManager.IMPORTANCE_DEFAULT);
// notificationChannel.setDescription("Channel description");
// notificationChannel.enableLights(true);
// notificationChannel.setLightColor(color);
// notificationChannel.setVibrationPattern(new long[]{0, 1000, 500, 1000});
// notificationChannel.enableVibration(true);
NotificationManager nm = (NotificationManager) context.getSystemService(NotificationManager.class);
nm.createNotificationChannel(notificationChannel);
Notification notification_build_with_largeicon = b.setChannelId(CHANNEL_ID).build();
notification_build_with_largeicon.flags = Notification.FLAG_AUTO_CANCEL; //notification with only large icon due to the two build notificaition is not canceled from bar
nm.notify(pc.getSessionUUID(), uid, notification_build_with_largeicon);
} else {
NotificationManager nm = (NotificationManager) context.getSystemService(NotificationManager.class);
Notification notification_build_with_largeicon = b.build();
notification_build_with_largeicon.flags = Notification.FLAG_AUTO_CANCEL; //notification with only large icon due to the two build notificaition is not canceled from bar
if (nm != null) {
......@@ -340,7 +342,7 @@ public class FCMBaseMessagingService extends FirebaseMessagingService {
builder.setContentIntent(pi);
NotificationManager nm = (NotificationManager) context
.getSystemService(NOTIFICATION_SERVICE);
.getSystemService(NotificationManager.class);
Notification notification_build = builder.build();
notification_build.flags = Notification.FLAG_AUTO_CANCEL;
nm.notify(tag, uid, notification_build);
......@@ -388,20 +390,15 @@ public class FCMBaseMessagingService extends FirebaseMessagingService {
b.setStyle(inboxStyle);
}
b.setDefaults(Notification.DEFAULT_VIBRATE | Notification.DEFAULT_LIGHTS);
b.setDefaults(Notification.DEFAULT_VIBRATE | Notification.DEFAULT_LIGHTS | Notification.DEFAULT_SOUND);
b.setTicker(pc.getTicker());
b.setChannelId(CHANNEL_ID);
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);
b.setPriority(Notification.PRIORITY_MAX);
b.setSmallIcon(WarplyProperty.getPushIconResId(context));
b.setLargeIcon(loadDrawable(pc.getImageUrl()));
......@@ -445,14 +442,13 @@ public class FCMBaseMessagingService extends FirebaseMessagingService {
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);
pi = PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_MUTABLE);
}
b.setContentIntent(pi);
// b.setFullScreenIntent(pi, true);
NotificationManager nm = (NotificationManager) context.getSystemService(NOTIFICATION_SERVICE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && nm != null) {
NotificationChannel notificationChannel = new NotificationChannel(CHANNEL_ID, "notification_channel", NotificationManager.IMPORTANCE_DEFAULT);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
NotificationChannel notificationChannel = new NotificationChannel(CHANNEL_ID, "notification_channel", NotificationManager.IMPORTANCE_HIGH);
// Configure the notification channel.
// notificationChannel.setDescription("Channel description");
// notificationChannel.enableLights(true);
......@@ -460,11 +456,13 @@ public class FCMBaseMessagingService extends FirebaseMessagingService {
// notificationChannel.setVibrationPattern(new long[]{0, 1000, 500, 1000});
// notificationChannel.enableVibration(true);
NotificationManager nm = (NotificationManager) context.getSystemService(NotificationManager.class);
nm.createNotificationChannel(notificationChannel);
Notification notification_build = b.setChannelId(CHANNEL_ID).build();
notification_build.flags = Notification.FLAG_AUTO_CANCEL;
nm.notify(pc.getSessionUUID(), uid, notification_build);
} else {
NotificationManager nm = (NotificationManager) context.getSystemService(NotificationManager.class);
Notification notification_build = b.build();
notification_build.flags = Notification.FLAG_AUTO_CANCEL;
if (nm != null) {
......
......@@ -251,20 +251,15 @@ public class HMSBaseMessagingService extends HmsMessageService {
b.setStyle(inboxStyle);
}
b.setDefaults(Notification.DEFAULT_VIBRATE | Notification.DEFAULT_LIGHTS);
b.setDefaults(Notification.DEFAULT_VIBRATE | Notification.DEFAULT_LIGHTS | Notification.DEFAULT_SOUND);
b.setTicker(pc.getTicker());
b.setChannelId(CHANNEL_ID);
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);
b.setPriority(Notification.PRIORITY_MAX);
b.setSmallIcon(WarplyProperty.getPushIconResId(context));
b.setLargeIcon(loadDrawable(pc.getImageUrl()));
......@@ -298,23 +293,30 @@ public class HMSBaseMessagingService extends HmsMessageService {
}
}
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 | PendingIntent.FLAG_MUTABLE);
}
b.setContentIntent(pi);
// b.setFullScreenIntent(pi, true);
NotificationManager nm = (NotificationManager) context.getSystemService(NOTIFICATION_SERVICE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && nm != null) {
NotificationChannel notificationChannel = new NotificationChannel(CHANNEL_ID, "notification_channel", NotificationManager.IMPORTANCE_DEFAULT);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
NotificationChannel notificationChannel = new NotificationChannel(CHANNEL_ID, "notification_channel", NotificationManager.IMPORTANCE_HIGH);
// notificationChannel.setDescription("Channel description");
// notificationChannel.enableLights(true);
// notificationChannel.setLightColor(color);
// notificationChannel.setVibrationPattern(new long[]{0, 1000, 500, 1000});
// notificationChannel.enableVibration(true);
NotificationManager nm = (NotificationManager) context.getSystemService(NotificationManager.class);
nm.createNotificationChannel(notificationChannel);
Notification notification_build_with_largeicon = b.setChannelId(CHANNEL_ID).build();
notification_build_with_largeicon.flags = Notification.FLAG_AUTO_CANCEL; //notification with only large icon due to the two build notificaition is not canceled from bar
nm.notify(pc.getSessionUUID(), uid, notification_build_with_largeicon);
} else {
NotificationManager nm = (NotificationManager) context.getSystemService(NotificationManager.class);
Notification notification_build_with_largeicon = b.build();
notification_build_with_largeicon.flags = Notification.FLAG_AUTO_CANCEL; //notification with only large icon due to the two build notificaition is not canceled from bar
nm.notify(pc.getSessionUUID(), uid, notification_build_with_largeicon);
......@@ -385,7 +387,7 @@ public class HMSBaseMessagingService extends HmsMessageService {
builder.setContentIntent(pi);
NotificationManager nm = (NotificationManager) context
.getSystemService(NOTIFICATION_SERVICE);
.getSystemService(NotificationManager.class);
Notification notification_build = builder.build();
notification_build.flags = Notification.FLAG_AUTO_CANCEL;
nm.notify(tag, uid, notification_build);
......@@ -433,20 +435,15 @@ public class HMSBaseMessagingService extends HmsMessageService {
b.setStyle(inboxStyle);
}
b.setDefaults(Notification.DEFAULT_VIBRATE | Notification.DEFAULT_LIGHTS);
b.setDefaults(Notification.DEFAULT_VIBRATE | Notification.DEFAULT_LIGHTS | Notification.DEFAULT_SOUND);
b.setTicker(pc.getTicker());
b.setChannelId(CHANNEL_ID);
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);
b.setPriority(Notification.PRIORITY_MAX);
b.setSmallIcon(WarplyProperty.getPushIconResId(context));
b.setLargeIcon(loadDrawable(pc.getImageUrl()));
......@@ -489,14 +486,13 @@ public class HMSBaseMessagingService extends HmsMessageService {
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);
pi = PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_MUTABLE);
}
b.setContentIntent(pi);
// b.setFullScreenIntent(pi, true);
NotificationManager nm = (NotificationManager) context.getSystemService(NOTIFICATION_SERVICE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && nm != null) {
NotificationChannel notificationChannel = new NotificationChannel(CHANNEL_ID, "notification_channel", NotificationManager.IMPORTANCE_DEFAULT);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
NotificationChannel notificationChannel = new NotificationChannel(CHANNEL_ID, "notification_channel", NotificationManager.IMPORTANCE_HIGH);
// Configure the notification channel.
// notificationChannel.setDescription("Channel description");
// notificationChannel.enableLights(true);
......@@ -504,11 +500,13 @@ public class HMSBaseMessagingService extends HmsMessageService {
// notificationChannel.setVibrationPattern(new long[]{0, 1000, 500, 1000});
// notificationChannel.enableVibration(true);
NotificationManager nm = (NotificationManager) context.getSystemService(NotificationManager.class);
nm.createNotificationChannel(notificationChannel);
Notification notification_build = b.setChannelId(CHANNEL_ID).build();
notification_build.flags = Notification.FLAG_AUTO_CANCEL;
nm.notify(pc.getSessionUUID(), uid, notification_build);
} else {
NotificationManager nm = (NotificationManager) context.getSystemService(NotificationManager.class);
Notification notification_build = b.build();
notification_build.flags = Notification.FLAG_AUTO_CANCEL;
nm.notify(pc.getSessionUUID(), uid, notification_build);
......
......@@ -131,20 +131,15 @@ public abstract class WarpBaseIntentService extends IntentService {
b.setStyle(inboxStyle);
}
b.setDefaults(Notification.DEFAULT_VIBRATE | Notification.DEFAULT_LIGHTS);
b.setDefaults(Notification.DEFAULT_VIBRATE | Notification.DEFAULT_LIGHTS | Notification.DEFAULT_SOUND);
b.setTicker(pc.getTicker());
// b.setChannelId(CHANNEL_ID);
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);
b.setPriority(Notification.PRIORITY_MAX);
b.setSmallIcon(WarplyProperty.getPushIconResId(context));
b.setLargeIcon(loadDrawable(pc.getImageUrl()));
......@@ -178,23 +173,30 @@ public abstract class WarpBaseIntentService extends IntentService {
}
}
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 | PendingIntent.FLAG_MUTABLE);
}
b.setContentIntent(pi);
// b.setFullScreenIntent(pi, true);
NotificationManager nm = (NotificationManager) context.getSystemService(NOTIFICATION_SERVICE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && nm != null) {
NotificationChannel notificationChannel = new NotificationChannel(CHANNEL_ID, "notification_channel", NotificationManager.IMPORTANCE_DEFAULT);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
NotificationChannel notificationChannel = new NotificationChannel(CHANNEL_ID, "notification_channel", NotificationManager.IMPORTANCE_HIGH);
// notificationChannel.setDescription("Channel description");
// notificationChannel.enableLights(true);
// notificationChannel.setLightColor(color);
// notificationChannel.setVibrationPattern(new long[]{0, 1000, 500, 1000});
// notificationChannel.enableVibration(true);
NotificationManager nm = (NotificationManager) context.getSystemService(NotificationManager.class);
nm.createNotificationChannel(notificationChannel);
// Notification notification_build_with_largeicon = b.setChannelId(CHANNEL_ID).build();
b.build().flags = Notification.FLAG_AUTO_CANCEL; //notification with only large icon due to the two build notificaition is not canceled from bar
nm.notify(pc.getSessionUUID(), uid, b.build());
} else {
NotificationManager nm = (NotificationManager) context.getSystemService(NotificationManager.class);
Notification notification_build_with_largeicon = b.build();
b.build().flags = Notification.FLAG_AUTO_CANCEL; //notification with only large icon due to the two build notificaition is not canceled from bar
nm.notify(pc.getSessionUUID(), uid, b.build());
......@@ -266,7 +268,7 @@ public abstract class WarpBaseIntentService extends IntentService {
builder.setContentIntent(pi);
NotificationManager nm = (NotificationManager) context
.getSystemService(NOTIFICATION_SERVICE);
.getSystemService(NotificationManager.class);
Notification notification_build = builder.build();
notification_build.flags = Notification.FLAG_AUTO_CANCEL;
nm.notify(tag, uid, notification_build);
......@@ -314,20 +316,15 @@ public abstract class WarpBaseIntentService extends IntentService {
b.setStyle(inboxStyle);
}
b.setDefaults(Notification.DEFAULT_VIBRATE | Notification.DEFAULT_LIGHTS);
b.setDefaults(Notification.DEFAULT_VIBRATE | Notification.DEFAULT_LIGHTS | Notification.DEFAULT_SOUND);
b.setTicker(pc.getTicker());
// b.setChannelId(CHANNEL_ID);
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);
b.setPriority(Notification.PRIORITY_MAX);
b.setSmallIcon(WarplyProperty.getPushIconResId(context));
b.setLargeIcon(loadDrawable(pc.getImageUrl()));
......@@ -359,25 +356,18 @@ public abstract class WarpBaseIntentService extends IntentService {
}
}
// Notification notification_build=b.build();
// nm.notify(pc.getSessionUUID(), uid, notification_build);
// Load bitmap from server and update the notification.
// Do not allow sound or anything else.
newIntent.setAction(Long.toString(System.currentTimeMillis()));
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);
pi = PendingIntent.getActivity(context, uid, newIntent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_MUTABLE);
}
b.setContentIntent(pi);
// b.setFullScreenIntent(pi, true);
NotificationManager nm = (NotificationManager) context.getSystemService(NOTIFICATION_SERVICE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && nm != null) {
NotificationChannel notificationChannel = new NotificationChannel(CHANNEL_ID, "notification_channel", NotificationManager.IMPORTANCE_DEFAULT);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
NotificationChannel notificationChannel = new NotificationChannel(CHANNEL_ID, "notification_channel", NotificationManager.IMPORTANCE_HIGH);
// Configure the notification channel.
// notificationChannel.setDescription("Channel description");
// notificationChannel.enableLights(true);
......@@ -385,11 +375,13 @@ public abstract class WarpBaseIntentService extends IntentService {
// notificationChannel.setVibrationPattern(new long[]{0, 1000, 500, 1000});
// notificationChannel.enableVibration(true);
NotificationManager nm = (NotificationManager) context.getSystemService(NotificationManager.class);
nm.createNotificationChannel(notificationChannel);
// Notification notification_build = b.setChannelId(CHANNEL_ID).build();
b.build().flags = Notification.FLAG_AUTO_CANCEL;
nm.notify(pc.getSessionUUID(), uid, b.build());
} else {
NotificationManager nm = (NotificationManager) context.getSystemService(NotificationManager.class);
// Notification notification_build = b.build();
b.build().flags = Notification.FLAG_AUTO_CANCEL;
nm.notify(pc.getSessionUUID(), uid, b.build());
......
......@@ -123,7 +123,7 @@ public class WarpInAppNotificationService extends WarpBaseIntentService {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
pendingIntent = PendingIntent.getBroadcast(context, uid, notifyIntent, PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_MUTABLE);
} else {
pendingIntent = PendingIntent.getBroadcast(context, uid, notifyIntent, PendingIntent.FLAG_CANCEL_CURRENT);
pendingIntent = PendingIntent.getBroadcast(context, uid, notifyIntent, PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE);
}
AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
alarmManager.cancel(pendingIntent);
......@@ -140,7 +140,7 @@ public class WarpInAppNotificationService extends WarpBaseIntentService {
Intent checkIntent = new Intent(context, WarplyInAppNotificationReceiver.class).putExtra(KEY_UID, uid);
// If there is an alarm already set up then returns true
return (PendingIntent.getBroadcast(context, uid, checkIntent, PendingIntent.FLAG_NO_CREATE) != null);
return (PendingIntent.getBroadcast(context, uid, checkIntent, PendingIntent.FLAG_NO_CREATE | PendingIntent.FLAG_IMMUTABLE) != null);
}
}
\ No newline at end of file
......
......@@ -30,7 +30,7 @@ public class WarpConstants {
/**
* The version of the SDK installed in the device
*/
public static final String SDK_VERSION = "4.5.5.1";
public static final String SDK_VERSION = "4.5.5.2";
/**
* The URL of the server where it should ping
......