alarm should repeat on monthly basis, once a month on same date for each month so on after its set like if i place alarm on october 31, then it should repeat on 31 of months hav
You should use cal.getActualMaximum(Calendar.DAY_OF_MONTH));. This gives you the maximum date for each month irrespective of the month.
cal.getActualMaximum(Calendar.DAY_OF_MONTH));