add JavaDoc

This commit is contained in:
ろむねこ 2024-07-11 14:41:17 +09:00
parent 2c5f0fe667
commit 61c2abcdad
No known key found for this signature in database
GPG Key ID: FA1F39A1BA37D168

View File

@ -67,11 +67,18 @@ public class TestService extends Service {
}
}
/**
* 通知チャネルが作成されているか確認
* @return 通知チャンネルの有無 true: 作成済み false: 未作成
*/
private boolean isNotificationChannelCreated() {
NotificationManager notificationManager = getSystemService(NotificationManager.class);
return notificationManager.getNotificationChannel(CHANNEL_ID) != null;
}
/**
* 通知チャネルの作成
*/
private void createNotificationChannel() {
int importance = NotificationManager.IMPORTANCE_DEFAULT;
NotificationChannel channel = new NotificationChannel(CHANNEL_ID, "通知", importance);