Issue
I start a calendar intent because i want to insert a new event to the google calendar.
This is the code:
Intent intent = newIntent(Intent.ACTION_INSERT).setData(CalendarContract.Events.CONTENT_URI);
startActivity(intent);
After startActivity gets called the Calendar App opens with this screen.
After i click on SAVE or BACK this screen is shown.
After i clicked SAVE or BACK i expected to return to my calling application, but i returned to the Google Calendar App month view.
If i click BACK again, i return to my application. So the user has to click BACK 2 times to return to the calling application.
How to return to my application directly? Any hints or tips?
THX
Solution
How to return to my application directly?
You don't.
You are linking to a third-party app. That app's developers control navigation within that app, not you or I. There are dozens, if not hundreds, of calendar apps that might respond to your ACTION_INSERT
, and their developers can do whatever they want.
This is not significantly different from linking to an external Web site from your site. If the developers of that site hijack back navigation, you cannot control that from your site.
If you do not like this, do not start third-party apps via Intent
actions.
Answered By - CommonsWare
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.