download and open .vcf file from webview

r2b2sr2b2s FRMember ✭✭

Hi,
I try to download .vcf file from asp.net serveur throught an .ashx page by simple link pointing that myserver/VCFDownloader.ashx?myparameters

WOrk well from all browser, but not from my hybrid app on my webview nothing append i've tried a lot of solution like

Intent i = new Intent(); i.SetAction(Intent.ActionView); i.SetDataAndType(Android.Net.Uri.Parse("data:text/vcard;base64,myb64data"), "text/vcard"); StartActivity(i);
tried with x-vard also...

also tried download direct from an physical .vcf file...

with mywebview.download handler i could download .vcf file to downloads directory but not open it

if someone have any ideas

regards

Answers

  • LeonLuLeonLu Member, Xamarin Team Xamurai
    edited September 18

    Now, you can download the .cvf file from your server, but you cannot open it with this webview.
    What is your code about the webview.
    If you enabled JavaScript and what is your code about the WebChromeClient?

    When you use vard, what was your error that you got?
    If you can read it correctly? If you read the physical .vcf file, If you requested the storage permission and grant it.

  • r2b2sr2b2s FRMember ✭✭
    edited September 18

    Yes off cours javascript is enabled and i use WebChromelient for my own filechooser

    if i read physical .vcf i've got error "impossible to read this vcf file" (in french off course), off course i can open directly this file
    and if i want to read the same file with .txt extenstion (work directly with a large choice of application), but with Intent i've only choice on 2 application (??) and it's open an ampty file ???

    my app have permission for read and write external storage

Sign In or Register to comment.