Download iCal files does not working on mobile Chrome

I have a simple code that generate an ics file and automatically opens calendar app on ios
I tested works well on MacOS desktop and safari on ios mobile phones, however my code does not works for chrome browser on mobile,

  var test =
        "BEGIN:VCALENDARn" +
        "CALSCALE:GREGORIANn" +
        "METHOD:PUBLISHn" +
        "PRODID:-//Test Cal//ENn" +
        "VERSION:2.0n" +
        "BEGIN:VEVENTn" +
        "UID:test-1n" +
        "DTSTART;VALUE=DATE:" +
        convertDate(starting_date_html) +
        "n" +
        "DTEND;VALUE=DATE:" +
        convertDate(ending_date_html) +
        "n" +
        "SUMMARY:" +
        event_title +
        "n" +
        "DESCRIPTION:" +
        event_location +
        "n" +
        "END:VEVENTn" +
        "END:VCALENDAR";
    window.open("data:text/Calendar;charset=utf8," + escape(test)); 

I cannot get my head around on this issue …

I also tried the encodeURIComponent but no luck :/


window.open("data:text/Calendar;charset=utf8," + encodeURIComponent(test));