Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_android_sdk_maven_plugin
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Panagiotis Triantafyllou
2022-05-05 13:11:45 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
cb2a093635cb5d879ca4553ed71488ecc05ae56c
cb2a0936
1 parent
8d3fd0f4
version 4.5.4.1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
62 additions
and
13 deletions
warply_android_sdk/build.gradle
warply_android_sdk/src/main/java/ly/warp/sdk/services/FCMBaseMessagingService.java
warply_android_sdk/src/main/java/ly/warp/sdk/services/HMSBaseMessagingService.java
warply_android_sdk/src/main/java/ly/warp/sdk/services/WarpBaseIntentService.java
warply_android_sdk/src/main/java/ly/warp/sdk/utils/constants/WarpConstants.java
warply_android_sdk/build.gradle
View file @
cb2a093
...
...
@@ -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'
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/services/FCMBaseMessagingService.java
View file @
cb2a093
...
...
@@ -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
);
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/services/HMSBaseMessagingService.java
View file @
cb2a093
...
...
@@ -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
);
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/services/WarpBaseIntentService.java
View file @
cb2a093
...
...
@@ -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
);
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/utils/constants/WarpConstants.java
View file @
cb2a093
...
...
@@ -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
...
...
Please
register
or
login
to post a comment