diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-11-19 10:21:18 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-11-19 10:21:18 +1300 |
commit | 3d400c3d64a79e98bec9b1d70554e636e6ae277e (patch) | |
tree | da8f29e036e1d8ae6c46cdabefa033733274502a /app/src | |
parent | 9231e195ef3250889920a4221612e69d4b7b5916 (diff) | |
download | etbsa-traccar-manager-android-3d400c3d64a79e98bec9b1d70554e636e6ae277e.tar.gz etbsa-traccar-manager-android-3d400c3d64a79e98bec9b1d70554e636e6ae277e.tar.bz2 etbsa-traccar-manager-android-3d400c3d64a79e98bec9b1d70554e636e6ae277e.zip |
Add push notification icon
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/google/AndroidManifest.xml | 4 | ||||
-rw-r--r-- | app/src/google/java/org/traccar/manager/ManagerMessagingService.java | 2 | ||||
-rw-r--r-- | app/src/main/res/drawable/ic_stat_notify.xml | 10 |
3 files changed, 15 insertions, 1 deletions
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" /> + <meta-data + android:name="com.google.firebase.messaging.default_notification_icon" + android:resource="@drawable/ic_stat_notify" /> + <service android:name=".ManagerMessagingService"> <intent-filter> <action android:name="com.google.firebase.MESSAGING_EVENT" /> 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 @@ +<vector + android:width="24dp" + android:height="24dp" + android:viewportHeight="72.0" + android:viewportWidth="72.0" + xmlns:android="http://schemas.android.com/apk/res/android"> + <path + android:fillColor="#FF000000" + android:pathData="M36,0A36,36 0,0 0,0 36A36,36 0,0 0,36 72A36,36 0,0 0,72 36A36,36 0,0 0,36 0zM50.51,14.66C53.41,16.89 55.93,19.68 57.88,23.05C59.83,26.42 60.99,30 61.46,33.63L55.09,34.55C54.72,31.74 53.87,28.85 52.36,26.24C50.85,23.63 48.78,21.45 46.53,19.72L50.51,14.66zM42.82,24.85C44.4,26.08 45.77,27.58 46.84,29.43C47.91,31.27 48.52,33.21 48.79,35.2L42.42,36.12C42.25,34.95 41.95,33.7 41.32,32.61C40.69,31.53 39.77,30.64 38.84,29.91L42.82,24.85zM18.38,31.13L24.76,42.17L31.13,53.21A12.75,12.75 37.68,0 1,18.38 53.21A12.75,12.75 37.68,0 1,12.01 42.17A12.75,12.75 37.68,0 1,18.38 31.13zM32.96,34.21A3.19,3.19 60,0 1,35.8 35.8A3.19,3.19 60,0 1,34.63 40.15A3.19,3.19 60,0 1,30.28 38.99A3.19,3.19 60,0 1,31.45 34.63A3.19,3.19 60,0 1,32.96 34.21z"/> +</vector> |