Class NotificationUtil

  • All Implemented Interfaces:

    
    public class NotificationUtil
    
                        

    Created by jiangecho on 2016/11/29.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • showNotification

         void showNotification(Context context, String title, String content, PendingIntent pendingIntent, int notificationId, int defaults)
        Parameters:
        context - the context
        title - the notification title
        content - the notification content
        pendingIntent - PendingIntent
        notificationId - the notification ID
        defaults - notification defaults controlling sound/vibrate/lights, maps to Builder.
      • getDefaultChannel

        @RequiresApi(api = Build.VERSION_CODES.O) NotificationChannel getDefaultChannel(Context context)