After launch calendar intent, how to "go ahead" with the app? Android -
escenario:
i have done activity allows user set info create entrance in calendar. afeter verify info launch intent open calendar info set.
thats how donde button:
bnext.setonclicklistener(new onclicklistener() { public void onclick(view v) { intent intent = new intent(intent.action_insert).setdata(events.content_uri) .putextra(calendarcontract.extra_event_begin_time, begintime.gettimeinmillis()) .putextra(calendarcontract.extra_event_end_time, endtime.gettimeinmillis()) .putextra(events.title, subject.gettext().tostring()) .putextra(events.event_location, location.gettext().tostring()) .putextra(events.availability, events.availability_busy) .putextra(intent.extra_email, "elias.ortiz@in2.es"); startactivity(intent); } } });
that opens calendar. after , confirm entrance, calendar app still open (as normal) when press "back button" go app.
image of flow (hand drawed)
question:
after come calendar, there way recognize entrance has been set, , go ahead activity?
instead of startactivity
, use startactivityforresult
calendar. override onactivityresult
. if calendar activity returns result_canceled
means button pressed. call startactivity
on activity want display, , finish()
on current activity if need to.
Comments
Post a Comment