use of net.osmand.plus.notifications.OsmandNotification.NotificationType in project Osmand by osmandapp.
the class NotificationDismissReceiver method onReceive.
@Override
public void onReceive(Context context, Intent intent) {
final NotificationHelper helper = ((OsmandApplication) context.getApplicationContext()).getNotificationHelper();
String notificationTypeStr = intent.getExtras().getString(NOTIFICATION_TYPE_KEY_NAME);
if (!Algorithms.isEmpty(notificationTypeStr)) {
try {
NotificationType notificationType = NotificationType.valueOf(notificationTypeStr);
helper.onNotificationDismissed(notificationType);
} catch (Exception e) {
// ignored
}
}
}
Aggregations