Reputation: 2284
We have an "add to calendar" button in a webpage that we send a link of to users via SMS. On Samsung devices it tends to open in the built-in Samsung Browser.
In all other devices and browsers the button works, it downloads an .ics file with a calendar event, and users can choose how to open that file, ie save in any of their calendars.
In the Samsung browser nothing happens when pressing the button. Does anyone else have experience of this issue, or even a solution?
Upvotes: 1
Views: 1699
Reputation: 312
It sounds like Samsung Mobile isn't registering .ics as a known protocol in the browser.
I run AddEvent.com, an "Add to Calendar" button service. I have run into the same issue on several occasions.
Facebook Messenger on iOS: When clicking the .ics file, the browser built into FB Messenger would simply show the contents of the .ics file and not invoke any action.
Firefox Browser (iOS). Nothing happened/no action.
After a lot of testing, I managed to figure out that all browsers/platforms support "webcal://". So instead of downloading the .ics file directly, I put the webcal protocol in front. That makes the browser subscribe to the file instead.
I have a page my users visit before the .ics file is downloaded. There I'm using javascript try to figure out which browser it is AND if the browser is in chromeless mode (used in an app). In case it's native, I serve the .ics file normally. In case it's chromeless, I use the "subscribe" approach.
Hope it points you in the right direction!
Upvotes: 3