Setting Reminder/trigger alarm on user defined date and time - android

I have trouble implementing Reminder for my app.i did research but couldnt find proper solution.
what i want is:
i am developing an android app which has one feature to remind users about the selected event 30 min before event start.
i will be displaying the date and time of the event in textview,on click of reminder button reminder will set 30min before event.
how can i proceed to implement this.
Note: i dont want to use date/time picker, specific date and time will be taken directly from text view which i will display.
Any suggestion/links with logic please help.
if any one can help dn please tell me the logic to add future,date + hours + minutes to current time to set alarm(date and time will be taken from textview)

Related

DatePickerDialog resets to default month when changing selectableDays

I have a DatePickerDialog (com.wdullaer.materialdatetimepicker.date) that has its selectableDays populated from an API.
The API that we use only supports retrieving one month at a time. As a result, we need to retrieve more selectableDays for the next month when the user taps the arrow to go to the next month. (Circled in red in the attached image)
We accomplish this by keeping a global list of calendars and adding additional Calendars from the network responses:
val selectableCalendars = HashSet<Calendar>() // List of available appointment dates (including time)
That works fine, but when DatePickerDialog is open and the following line runs to change the selectable days:
datePickerDialog.selectableDays = selectableCalendars.toTypedArray()
The DatePickerDialog will jump back to the first month in the calendar list.
This "jump back to June" (unintended behavior) always occurs under the following circumstances:
1.) Immediately after we set datePickerDialog.selectableDays to a new value.
2.) Only if there are no selectable days for the month the user scrolled into. (Bug does not occur if there are selectable days in the
returned month!)
Does anyone have a workaround for this issue?
By checking the code here
https://github.com/wdullaer/MaterialDateTimePicker/blob/f849a5c2704c974ba182fe4e2e205fa7f4fd395d/library/src/main/java/com/wdullaer/materialdatetimepicker/date/DatePickerDialog.java#L846
It seems that after you set new selectableDays, the refresh function will take current selected day position and scroll back to it https://github.com/wdullaer/MaterialDateTimePicker/blob/f849a5c2704c974ba182fe4e2e205fa7f4fd395d/library/src/main/java/com/wdullaer/materialdatetimepicker/date/DayPickerView.java#L142
So my proposal will be setting the mSelectedDay to the first day of the month when user scoll to the next month. Which I think also not a great user experience.
I would also recommend to post this question on author's github page, or search for similar question/issue/bug history in the library github pag

set alarm notification between two specific date with particular day in android

Hello friends i want to set notification with two specific dates like
date1= 2014/10/30
date2=2015/10/30
and alarm should be notify at every 5th day(means date=5) of every month until date2.
how can i achieve this any idea Thanks in advances?

How to Handle repeated calendar event in android

I want to handle repeated Google calender events for changing phone mode to silent/general . Normal one time events are work properly but in the case of repeated events i can't get the ending date and time. Only get an predefined Ending time(Thu, 1 Jan 5:30:00 IST 1970). How to over come this problem.?
In CalendarContract, it is defined that for recurring event DTEND(end time) is null, but DURATION is defined.
Please refer to http://developer.android.com/reference/android/provider/CalendarContract.Events.html

How to set multiple reminders on a Button Click event in Android?

Need Help..!
I'm working on Android, What I'm Trying to do is-- "I have two TIMES--
1) From-TIME (e.g. 12:15:00 hh:mm:ss) and 2) To-TIME (e.g. 2:30:00 hh:mm:ss), I wants to set two reminder 1) 15 minute before the From-TIME and 2) 15 minute before To-TIME. So can you please tell me how can I set these two reminder on just button click event..?" Thanks in Advance..!

Calling the date time , without initiating the dialog box of Datetime control

I am basically using a datetime control in my application.
Wherein on a click event i am initiating datetime dialog.
In another scenario, i want to move current date, to next day, or previous day.
I don't want the dialogbox of date time control to be displayed.
Is it possible??
The DatePicker and TimePicker controls are available as widgets for you to use in your layouts or code.
You can then build the next day / previous day functionality yourself by setting the date / time of those controls.

Categories

Resources