Results 1 to 3 of 3
  1.    #1  
    I am facing some issues while creating vcard (.vcf file).

    I tried following approaches so far:-

    1) I used palm predefined service request. We used the following code:
    var request = new Mojo.Service.Request('palm://com.palm.contacts/',
    {
    method: 'vCardExportOne',
    parameters: {
    contact:contactTemp //contactTemp is object of type contact
    },
    onFailure: function(){
    Mojo.Log.info("on Failure**************");
    },
    onSuccess: function(){
    Mojo.Log.info("on Success **************");
    }
    }



    This function always goes on "on failure".
    Is there any API available to create .vcf file from contact object?

    2) I tried to create a local file and write into it in .vcf format, however I am not able to create or write into local file.

    So, is there any API or any predefined service available to create a file and write into it?

    3) I tried using "IMPORTS". the code is :

    var fs = IMPORTS.require("fs");
    var path = "documents/newfile.txt";
    var content = "Hi";

    fs.writeFile(path, content, 'utf8', function(err) { future.result = { path: path, bytes: content.length, error: err }; });

    Result is:
    Error: IMPORTS is not defined, line undefined, file undefined

    4) I tried to create local file using "ActiveXObject" of JavaScript and "AJAX" but these are also not working with WebOS.

    function WriteToFile(sText){
    var fso = new ActiveXObject("Scripting.FileSystemObject");
    varFileObject = fso.OpenTextFile("C:\\LogFile.txt", 8, true,0);
    newObject.write(sText);
    newFileObject.close();
    }


    Any help appreciated.....

    thanks in advance..........
  2. #2  
    if you are on sprint type ##66623# then you can follow instructions from there. Hit cellbrite export. The card will be in the .temp folder. The folder is hidden so enable view hidden files & folders on the computer & hook up the pre in US mode. It will be there in the .temp folder.
  3.    #3  
    Thanks for reply
    But i want to create .vcf file through javascripts, so that i can create a customize vcard and save somewhere in mobile local memory as a physical file.

Posting Permissions