From 3d400c3d64a79e98bec9b1d70554e636e6ae277e Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 19 Nov 2018 10:21:18 +1300 Subject: Add push notification icon --- app/src/google/AndroidManifest.xml | 4 ++++ .../java/org/traccar/manager/ManagerMessagingService.java | 2 +- app/src/main/res/drawable/ic_stat_notify.xml | 10 ++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 app/src/main/res/drawable/ic_stat_notify.xml diff --git a/app/src/google/AndroidManifest.xml b/app/src/google/AndroidManifest.xml index cd5ddd8..c0215a1 100644 --- a/app/src/google/AndroidManifest.xml +++ b/app/src/google/AndroidManifest.xml @@ -16,6 +16,10 @@ android:name="com.google.firebase.messaging.default_notification_channel_id" android:value="@string/notification_channel_id" /> + + diff --git a/app/src/google/java/org/traccar/manager/ManagerMessagingService.java b/app/src/google/java/org/traccar/manager/ManagerMessagingService.java index 55e664b..55a3b06 100644 --- a/app/src/google/java/org/traccar/manager/ManagerMessagingService.java +++ b/app/src/google/java/org/traccar/manager/ManagerMessagingService.java @@ -32,7 +32,7 @@ public class ManagerMessagingService extends FirebaseMessagingService { PendingIntent pendingIntent = PendingIntent.getActivity( this, 0, new Intent(this, MainActivity.class), PendingIntent.FLAG_ONE_SHOT); NotificationCompat.Builder builder = new NotificationCompat.Builder(this, getString(R.string.notification_channel_id)) - .setSmallIcon(R.mipmap.ic_launcher) + .setSmallIcon(R.drawable.ic_stat_notify) .setContentTitle(getString(R.string.app_name)) .setContentText(remoteMessage.getNotification().getBody()) .setAutoCancel(true) diff --git a/app/src/main/res/drawable/ic_stat_notify.xml b/app/src/main/res/drawable/ic_stat_notify.xml new file mode 100644 index 0000000..a64534a --- /dev/null +++ b/app/src/main/res/drawable/ic_stat_notify.xml @@ -0,0 +1,10 @@ + + + -- cgit v1.2.3