ERROR: I don't get a bell when there's a notification from firebase

ERROR: I don't get a bell when there's a notification from firebase

我创建了一个应用程序来控制设备并接收来自 Firebase 的通知。在 Android 和 iOS 上接收通知时出现问题。当应用程序打开时我可以收到声音通知,但是在 android 当应用程序停止时,我收到通知但没有声音,当应用程序 运行 背景时我收到通知和声音,在 iOS 当应用 运行 背景和停止时,都有通知但没有响铃。

enviroment:
 react: 16.8.6
 react-native:  0.60.5,
 react-native-firebase: 5.5.6

希望得到大家的支持。谢谢大家!

我做到了,我的方法是创建 1 个优先级为 PRIORITY_MAX 的新频道,并且 ios 只在发送通知时启用声音。

public class MainActivity extends NavigationActivity {

    private void createNotificationChannel() {
    // Create the NotificationChannel, but only on API 26+ because
    // the NotificationChannel class is new and not in the support library
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
            String id = getString(R.string.channel_id);
            String name = getString(R.string.channel_name);
            String description = getString(R.string.channel_description);
            // Log.d("ReactNative", "MEAPP: Creating channel: " + id +", name: " + name + ", description: " + description + " .");
            int importance = NotificationManager.IMPORTANCE_MAX;
            NotificationChannel channel = new NotificationChannel(id, name, importance);
            channel.setDescription(description);
            NotificationManager notificationManager = getSystemService(NotificationManager.class);
            if (notificationManager != null) {
                notificationManager.createNotificationChannel(channel);
            }
        }
    }
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        this.createNotificationChannel();
        SplashScreen.show(this);  // here
        super.onCreate(savedInstanceState);
        // ServiceUtil.createNotificationChannel(this);
    }
}