0
我正嘗試在Firebase上創建新用戶。但是,儘管激活了電子郵件認證,但我仍然遇到了這個錯誤。在Firebase上創建新用戶時出錯
我正嘗試在Firebase上創建新用戶。但是,儘管激活了電子郵件認證,但我仍然遇到了這個錯誤。在Firebase上創建新用戶時出錯
我們將需要更多的細節,如代碼或東西,但我認爲你需要創建一個帶有特定信道ID的通知信道。
NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
String id = "my_channel_01";
int importance = NotificationManager.IMPORTANCE_LOW;
NotificationChannel mChannel = new NotificationChannel(id, name,importance);
mChannel.enableLights(true);
mNotificationManager.createNotificationChannel(mChannel);
第一種方法是在構造函數通知中設置通道:
Notification notification = new Notification.Builder(MainActivity.this , id).setContentTitle("Title");
mNotificationManager.notify("your_notification_id", notification);
第二種方法是Notificiation.Builder.setChannelId()
Notification notification = new Notification.Builder(MainActivity.this).setContentTitle("Title").
setChannelId(id);
mNotificationManager.notify("your_notification_id", notification);
希望這有助於設置通道