mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
More apps notifications support, add "Games" notifications and changes for huami (#5767)
Changes: * Add more apps notifications support * Add "Games" notifications type * Add "Weather" notifications type * Add VK, QQ and weather support for Huami devices * Huami: Set Skype icon for Discord notifications * Huami: Show "Games" notifications with PokemonGo icon Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/5767 Co-authored-by: Roker2 <dimaminko2000@gmail.com> Co-committed-by: Roker2 <dimaminko2000@gmail.com>
This commit is contained in:
+24
-1
@@ -67,6 +67,12 @@ public class AppNotificationType extends HashMap<String, NotificationType> {
|
||||
// Conversations
|
||||
put("eu.siacs.conversations", NotificationType.CONVERSATIONS);
|
||||
put("de.pixart.messenger", NotificationType.CONVERSATIONS);
|
||||
put("org.jitsi.meet", NotificationType.CONVERSATIONS);
|
||||
put("com.microsoft.teams", NotificationType.CONVERSATIONS);
|
||||
put("us.zoom.videomeetings", NotificationType.CONVERSATIONS);
|
||||
put("com.nextcloud.talk2", NotificationType.CONVERSATIONS);
|
||||
put("com.cisco.wx2.android", NotificationType.CONVERSATIONS);
|
||||
put("com.google.android.apps.tachyon", NotificationType.CONVERSATIONS);
|
||||
|
||||
// Element, ElementX, SchildiChat, FluffyChat
|
||||
// (making the last two an extra Notification Type to give them distinct colors is debatable)
|
||||
@@ -198,8 +204,25 @@ public class AppNotificationType extends HashMap<String, NotificationType> {
|
||||
// KTrip
|
||||
put("org.kde.ktrip", NotificationType.TRANSIT);
|
||||
|
||||
// Others
|
||||
// VK
|
||||
put("com.vkontakte.android", NotificationType.VK);
|
||||
put("com.vkmp3mod.android", NotificationType.VK);
|
||||
put("ua.itaysonlab.vkx", NotificationType.VK);
|
||||
|
||||
// Games
|
||||
put("com.valvesoftware.android.steam.community", NotificationType.GAMES);
|
||||
put("com.google.android.play.games", NotificationType.GAMES);
|
||||
put("com.scee.psxandroid", NotificationType.GAMES);
|
||||
put("com.microsoft.xboxone.smartglass", NotificationType.GAMES);
|
||||
put("com.nintendo.znca", NotificationType.GAMES);
|
||||
put("com.nianticlabs.pokemongo", NotificationType.GAMES);
|
||||
|
||||
// Weather
|
||||
put("org.breezyweather", NotificationType.WEATHER);
|
||||
put("com.motorola.timeweatherwidget", NotificationType.WEATHER);
|
||||
put("com.google.android.apps.weather", NotificationType.WEATHER);
|
||||
|
||||
// Others
|
||||
put("com.tencent.mobileqq", NotificationType.QQ);
|
||||
put("com.tumblr", NotificationType.TUMBLR);
|
||||
put("com.pinterest", NotificationType.PINTEREST);
|
||||
|
||||
@@ -59,6 +59,8 @@ public enum NotificationType {
|
||||
PINTEREST,
|
||||
YOUTUBE,
|
||||
GADGETBRIDGE_TEXT_RECEIVER,
|
||||
GAMES,
|
||||
WEATHER,
|
||||
;
|
||||
|
||||
|
||||
@@ -85,6 +87,7 @@ public enum NotificationType {
|
||||
case SNAPCHAT:
|
||||
case INSTAGRAM:
|
||||
case LINKEDIN:
|
||||
case VK:
|
||||
return "generic_social";
|
||||
case CONVERSATIONS:
|
||||
case FACEBOOK_MESSENGER:
|
||||
@@ -118,6 +121,8 @@ public enum NotificationType {
|
||||
return "generic_email";
|
||||
case COL_REMINDER:
|
||||
case GADGETBRIDGE_TEXT_RECEIVER:
|
||||
case GAMES:
|
||||
case WEATHER:
|
||||
case UNKNOWN:
|
||||
default:
|
||||
return "generic";
|
||||
|
||||
+13
-3
@@ -98,22 +98,31 @@ public class HuamiIcon {
|
||||
return LINE;
|
||||
case WIRE:
|
||||
case THREEMA:
|
||||
case ELEMENT:
|
||||
return CHAT_BLUE_13;
|
||||
case TWITTER:
|
||||
return TWITTER;
|
||||
case SKYPE:
|
||||
case DISCORD:
|
||||
return SKYPE;
|
||||
case VK:
|
||||
return VKONTAKTE;
|
||||
case GAMES:
|
||||
return POKEMONGO;
|
||||
case SNAPCHAT:
|
||||
return SNAPCHAT;
|
||||
case TELEGRAM:
|
||||
return TELEGRAM;
|
||||
case VIBER:
|
||||
case DISCORD:
|
||||
return VIBER;
|
||||
case WHATSAPP:
|
||||
return WHATSAPP;
|
||||
case GENERIC_ALARM_CLOCK:
|
||||
return ALARM_CLOCK;
|
||||
case QQ:
|
||||
return PENGUIN_1;
|
||||
case WEATHER:
|
||||
return WEATHER;
|
||||
}
|
||||
return APP_11;
|
||||
}
|
||||
@@ -138,9 +147,10 @@ public class HuamiIcon {
|
||||
case VKONTAKTE:
|
||||
case CHINESE_32:
|
||||
case EMAIL:
|
||||
case WEATHER:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user