java - Android Calender reminder event issue -
hello newbie here dont care if people or not......... not understand way site work.................
if ask question has been asked negative points..... , luckily if find useful.. problem then... can not add comments post clarify answer me... instance found following link useful me
put reminder in real calendar on phone?
in code user have used following line
uri events_uri = uri.parse(getcalendaruribase(this) + "events");
i don't understand should because uri.parse() takes string argument here uses activity argument in
getcalendaruribase(activity act)
i not have asked question if would've allowed add comments post
i hope can understand point.... , full code please visit above link
it strange didn't understand answer.
getcalendaruribase returns string, implementation in answer.
i copypaste here you
private string getcalendaruribase(activity act) { string calendaruribase = null; uri calendars = uri.parse("content://calendar/calendars"); cursor managedcursor = null; try { managedcursor = act.managedquery(calendars, null, null, null, null); } catch (exception e) { } if (managedcursor != null) { calendaruribase = "content://calendar/"; } else { calendars = uri.parse("content://com.android.calendar/calendars"); try { managedcursor = act.managedquery(calendars, null, null, null, null); } catch (exception e) { } if (managedcursor != null) { calendaruribase = "content://com.android.calendar/"; } } return calendaruribase;
Comments
Post a Comment