I want to do the alarm type task using rxjava. I'm already using rxjava interval operator but this asks for time interval I don't want to give time interval instead I want to repeat the function daily on 12:00 am.
This is my code for interval-based Rx Observable:
return Observable.interval(delay, TimeUnit.SECONDS).timeInterval()
.flatMap((Function<Timed<Long>, ObservableSource<CustomTime.TimeTempBuilder>>) longTimed -> getDataManager().getTimeByDate(date));
Purpose: I have a foreground service running daily I have to show the notification at a specific time.