launching ICSx5 from ZXing / Barcode scan? Android downloads instead of subscribing


  • I installed both ICSx5 and ZXing on a device.

    I put an iCalendar feed URL into a QR code (edit: the feed URL has the https: prefix)

    I can the QR code with the Barcode scanner app (ZXing)

    ZXing probes the HTTP server, there is a log entry in the server.

    I verified that the HTTP server includes a header “Content-Type: text/calendar”

    ZXing gives me the options “Open browser”, “Share via email” and “Share via SMS”.

    There is no option to Subscribe to the feed

    If I select “Open browser”:

    • the browser asks me if I want to Download,
    • I click the Download button,
    • after the download, it asks me “Open with Calendar” and shows the buttons “Just Once”, “Always”. It also has “Use a different app” and it offers “HTML Viewer”. The ICSx5 app doesn’t appear in the choices.
    • if I choose “Open with Calendar”, it does not subscribe, it copies one event from the file to the calendar

    Can you please make ICSx5 appear as a handler for the iCalender (ics) files from the browser and clicks in emails?

    Once it is fixed for the browser, should it work directly from ZXing or does ZXing need some patch to support non-HTML URLs?


  • In my first QR code, I was using the https: prefix

    I created a second QR code using a webcal or webcals URL prefix

    Now I observe the following when I scan the QR code:

    • ZXing shows the same buttons “Open with browser”, etc
    • if I click “Open with browser”, ZXing opens ICSx5 immediately. I verified in the HTTP logs that the browser never makes a hit on the URL

    I suspect that with some scripting on the server side, for example, with PHP, JSP or Apache’s mod_negotiation it may be possible to detect which type of client is accessing the URL and give them a redirect.

    Nonetheless, it would still be very useful to go directly from a http://.../something.ics to ICSx5 whenever the MIME type text/calendar appears in the Content-Type header.

  • developer

    @pocock The intent filter for that is specified, but the default browser setting seems to override anything for http:// and https:// here in the Android 12 emulator.


  • @rfc2822 thanks for this feedback

    Here is a summary of what I found:

    URL prefix in QR code: webcal:
    ICSx5 installed already?: No
    Result: “Sorry, the requested application could not be launched. The barcode contents may be invalid”

    URL prefix in QR code: webcal:
    ICSx5 installed already?: Yes
    Result: the button says “Open in browser” but it actually opens ICSx5 correctly

    URL prefix in QR code: http:
    ICSx5 installed already?: Yes
    Result: the button says “Open in browser” and it goes to the browser, not ICSx5

    Conclusion: I think it is probably best to use http:// URLs in the QR codes. Server-side script can see if the Accept: header includes text/calendar and either return the calendar or display a help page with both a clickable webcal: link and also a download link for ICSx5. I’ll publish an example later.

Similar topics