Class NotificationHelper

java.lang.Object
com.example.slacks_lottoevent.Utility.NotificationHelper

public class NotificationHelper extends Object
Helper class for managing and sending notifications in the application. This class handles notification permissions, building notification content, and displaying notifications to the user.
  • Constructor Details

    • NotificationHelper

      public NotificationHelper(android.app.Activity activity)
      Constructs a new instance of NotificationHelper.
      Parameters:
      activity - The activity context used for permission checks and notification management.
  • Method Details

    • sendNotifications

      public void sendNotifications(String deviceId, String title, String message)
      Sends a notification with the specified title and message to the user. Handles permission requests
      Parameters:
      deviceId - A unique identifier for the device, used to generate unique notification IDs.
      title - The title of the notification.
      message - The message content of the notification.