It works the same way as in an activity, so you can use an example from the Android documentation.
The only difference is that you need to use getActivity()
to get the system service:
NotificationManager mNotificationManager =
(NotificationManager) getActivity().getSystemService(Context.NOTIFICATION_SERVICE);