diff --git a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationScheduler.java b/android/src/main/java/com/timesafari/dailynotification/DailyNotificationScheduler.java index 3bc9c46..af7f2a4 100644 --- a/android/src/main/java/com/timesafari/dailynotification/DailyNotificationScheduler.java +++ b/android/src/main/java/com/timesafari/dailynotification/DailyNotificationScheduler.java @@ -587,10 +587,13 @@ public class DailyNotificationScheduler { public boolean isScheduled(String scheduleId, Long triggerAtMillis) { try { // Delegate to NotifyReceiver which checks actual AlarmManager state - return com.timesafari.dailynotification.NotifyReceiver.isAlarmScheduled( + // Note: NotifyReceiver.isAlarmScheduled is a Kotlin companion object function with default parameters + // From Java, we need to use Companion and provide explicit values (null is acceptable for optional params) + // Kotlin Long? maps to java.lang.Long in Java + return com.timesafari.dailynotification.NotifyReceiver.Companion.isAlarmScheduled( context, - scheduleId != null ? scheduleId : null, - triggerAtMillis != null ? triggerAtMillis : null + scheduleId, + triggerAtMillis ); } catch (Exception e) { Log.e(TAG, "Error checking alarm schedule status", e); @@ -618,7 +621,9 @@ public class DailyNotificationScheduler { public Long getNextAlarmTime() { try { // Delegate to NotifyReceiver which checks actual AlarmManager state - return com.timesafari.dailynotification.NotifyReceiver.getNextAlarmTime(context); + // Note: NotifyReceiver.getNextAlarmTime is a Kotlin companion object function + // Kotlin Long? maps to java.lang.Long in Java + return com.timesafari.dailynotification.NotifyReceiver.Companion.getNextAlarmTime(context); } catch (Exception e) { Log.e(TAG, "Error getting next alarm time", e); return null;