Why does accepting Calendar invites open a browser? Can I prevent it? I'm on an unrooted Galaxy Nexus, and using stock Gmail and Calendar apps on Android 4.1.1. But I am using Chrome rather than the stock browser.

When I get a invite from a Gmail user to my Gmail account, it appears with "Yes/Maybe/No" option links and an invite.ics attachment (which doesn't do anything: "No app can open this attachment for viewing").


Clicking one of "Yes/Maybe/No", whether I have already done so or not,  opens Chrome with a warning "You are trying to use the desktop version of Google Calendar from a mobile browser [...] use the mobile version instead?"


If I click "OK" I get the mobile browser version of Calendar, but it's a view of today's appointments. There is no mention of the event I've responded to or any confirmation message about my response having been registered.
If I click "Cancel" I get the desktop version of Calendar showing the details of the appointment and a messaging confirming the response I have sent.

In either case, the event is in my calendar; the invite remains in my inbox.


I guess the core of my question is whether I can prevent the browser opening at all - surely the mechanics of accepting invites should be performed in the Calendar app and thus work offline?

Note that this question is about invites from Google Calendar and not about handling .ics files in general.
There is very little you can do! The calendar application is wired up to trigger a open intent to the web browser to accept the invites, its written up in the package's manifest.

&lt;activity android:name="GoogleCalendarUriIntentFilter" android:label="@string/app_label"
    android:theme="@android:style/Theme.NoDisplay"
    android:configChanges="orientation|keyboardHidden"&gt;

    &lt;intent-filter
       android:priority="50"&gt;
       &lt;action android:name="android.intent.action.VIEW" /&gt;
       &lt;category android:name="android.intent.category.DEFAULT" /&gt;
       &lt;category android:name="android.intent.category.BROWSABLE" /&gt;
       &lt;data android:scheme="http" android:host="www.google.com" android:pathPrefix="/calendar/event" /&gt;
       &lt;data android:scheme="https" android:host="www.google.com" android:pathPrefix="/calendar/event" /&gt;
       &lt;data android:scheme="http" android:host="www.google.com" android:pathPattern="/calendar/hosted/.*/event" /&gt;
       &lt;data android:scheme="https" android:host="www.google.com" android:pathPattern="/calendar/hosted/.*/event" /&gt;
    &lt;/intent-filter&gt;
&lt;/activity&gt;


Source: packages/apps/Calendar/src/com/android/calendar/GoogleCalendarUriIntentFilter.java