Reputation: 1956
You can open Android apps from within Chrome using HTML links.
And I know that an intent from within an Android app to open the calendar is content://com.android.calendar/time
(How to use Calendar Intent?)
Now I want to create a HTML link to open the calendar app from within Chrome. Note, this is a scenario where my app is not installed on the Android device. So I cannot create App intents to redirect to the calendar app.
I imagine something like this:
intent://time#Intent;scheme=content;package=com.android.calendar;end
Unfortunately that link doesn't work — it opens a "Not found" page in the Play Store.
What am I missing? What would the link need to look like?
Source: Calendar App Manifest.xml
Possible duplicate: open android calendar with html link.
Upvotes: 2
Views: 4162
Reputation: 276
To open an activity from a browser the activity's intent-filter must have the BROWSABLE category.
If you look at the AndroidManifest.xml
from the Google Calendar app you referenced, there exists only one such activity: com.android.calendar/.GoogleCalendarUriIntentFilter
. This activity accepts URLs to calendar events, including URLs that start with https://www.google.com/calendar/event.
If you don't mind the short warning message that the opened event doesn't exist, you could use this link to open the Calendar app from a browser. If you prefer an intent link, you could also use intent://www.google.com/calendar/event#Intent;scheme=https;package=com.google.android.calendar;end
, but unfortunately you won't be able to start com.android.calendar/.AllInOneActivity
, the activity listening for content://...
URLs, directly from the browser.
Upvotes: 4