Skip to content

Commit

Permalink
Added check for "silent" notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
DelphiWorlds committed Jul 25, 2023
1 parent 8a8a407 commit d119fd3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Java/Base/DWNotificationPresenter.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ private static Bitmap getBitmap(URL url) {
try {
bitmap = BitmapFactory.decodeStream(url.openConnection().getInputStream());
} catch (IOException iOException) {
Log.w("DWNotificationPresenter", "Could not retrieve image from " + url);
Log.w(TAG, "Could not retrieve image from " + url);
}
if (bitmap != null) {
int i;
Expand All @@ -52,7 +52,7 @@ private static Bitmap getBitmap(URL url) {
bitmap.recycle();
return compareBitmap;
}
Log.d("DWNotificationPresenter", "Failed to retrieve or decode image");
Log.d(TAG, "Failed to retrieve or decode image");
return null;
}

Expand Down Expand Up @@ -111,6 +111,9 @@ private static String getDefaultChannelId(NotificationManager notificationManage
}

public static void presentNotification(Context context, Intent intent, String channelId, int iconId) {
// presentNotification can be called from more than one origin, so if it is silent, stop it here..
if (intent.hasExtra("isSilent") && intent.getStringExtra("isSilent").equals("1"))
return;
mUniqueId++;
intent.setClassName(context, "com.embarcadero.firemonkey.FMXNativeActivity");
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
Expand Down
Binary file modified Lib/dw-kastri-base-2.0.0.jar
Binary file not shown.

0 comments on commit d119fd3

Please sign in to comment.