Не появляются уведомления в Android приложении

При успешной регистрации в окне регистрации, после нажатия на кнопку, должно появляться уведомление в шторке. Попробовал написать сам, но увы на эмуляторе уведомление не приходит. При этом остальной код работает. Уже сижу несколько часов, ничего не получается. Прошу, помогите пожалуйста. Я студент, не пинайте меня сильно) Вот код:

package com.example.myapplication;

import androidx.appcompat.app.AppCompatActivity;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import androidx.core.app.NotificationCompat;

public class RegisterActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_register);



        EditText LogButton = findViewById(R.id.editTextPhone2);
        EditText PassButton = findViewById(R.id.editTextText);
        Button RegButton = findViewById(R.id.button);

        RegButton.setOnClickListener(v -> {
            String login = LogButton.getText().toString().trim();
            String pass = PassButton.getText().toString().trim();

            if (login.isEmpty() || pass.isEmpty()) {
                Toast.makeText(RegisterActivity.this, "Введите все данные!", Toast.LENGTH_SHORT).show();
            } else {
                DBConnection db = new DBConnection(RegisterActivity.this, null);
                User user = new User(login, pass);

                if (db.checkUsernameExists(user.getLogin())) {
                    Toast.makeText(RegisterActivity.this, "Такой логин уже существует!", Toast.LENGTH_SHORT).show();
                } else {
                    db.addUser(user);
                    Toast.makeText(RegisterActivity.this, "Регистрация прошла успешна!", Toast.LENGTH_LONG).show();
                    sendNotification("Авторизация прошла успешно!");
                    finish();
                }
            }
        });
    }

    public void Nazad(View view) {
        Intent intent = new Intent(this, MainActivity.class);
        startActivity(intent);
    }

    public void ResversVhod(View view) {
        Intent intent = new Intent(this, MainActivity.class);
        startActivity(intent);
    }
    
    private void sendNotification(String message) {
        NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
        String channelId = "registration_channel";

        // Создание канала уведомлений для Android Oreo и выше
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
            NotificationChannel channel = new NotificationChannel(channelId, "Registration Notifications", NotificationManager.IMPORTANCE_DEFAULT);
            notificationManager.createNotificationChannel(channel);
        }

        // Создание уведомления
        NotificationCompat.Builder builder = new NotificationCompat.Builder(this, channelId)
                .setSmallIcon(R.drawable.dumbbells_gym_fitness_sport_icon_186978) // Замените на ваш значок уведомления
                .setContentTitle("Регистрация")
                .setContentText(message)
                .setPriority(NotificationCompat.PRIORITY_DEFAULT);

        // Отправка уведомления
        notificationManager.notify(1, builder.build());
    }



}

Ответы (0 шт):