notificationManagerを共有するように

This commit is contained in:
ろむねこ 2024-07-11 14:23:18 +09:00
parent d723165b76
commit 6667a63bff
No known key found for this signature in database
GPG Key ID: FA1F39A1BA37D168

View File

@ -197,8 +197,6 @@ public class TestService extends Service {
notificationManager.createNotificationChannel(channel);
}
NotificationManager notificationManager = (NotificationManager) context.getSystemService(context.NOTIFICATION_SERVICE);
if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED) {
return;
}