Start a new topic

mailto: and tel: links?

mailto: and tel: links?


Is it possible to use mailto and tel links? 
If I add the links to the index.html file for an augmentation they work, but setting the url as a mailto or tel link in the project javascript object doesn't work.

Thanks 

I am sorry,

but could you describe the issue in more detail, especially the meaning of "but setting the url as a mailto or tel link in the project javascript object doesn't work".

Best regards


 

Sure, 

In my augmentation two clickable links are brought up when the target image is found.
One link is set to "tel:xxx-xxx-xxxx" and the other is set to "mailto:xxx@xxx.com"

I'm using the downloaded files generated from Wikitude studio. 

In my content_mini.js: 

var project = {

    "id": 31526,

    "targetCollections": {

        "V2": {

            "targetCollectionUrl": "wtc/targetcollections_4.0.x.wtc"

        },

        "V3": {

            "targetCollectionUrl": "wtc/targetcollections_4.1.x.wtc"

        },

        "V1": {

            "targetCollectionUrl": "wtc/targetcollections_3.x.wtc"

        },

        "targetCollectionThumbnailUrl": "http://s3-eu-west-1.amazonaws.com/studio-live/720573/datasets/dbdd5037-b9b7-4b84-8923-d4efb4868cc1/dataset_gallery.png"

    },

    "targetCollectionUrl": "wtc/targetcollections.wtc",

    "lastLocallyStored": "2015-10-05T18:58:27.620Z",

    "targets":

};

 

However, when these links are clicked they do not work properly. They simply open the default web broswer to a blank page. 
This is on Android.

 

Thanks

Hi Jacob,

Please be aware that the JSON format of Studio is for internal use only and may be subject of change in the future.
Technically speaking it is used as input of a 'converter', who creates AR-objects out of the given JSON. Click actions are then opened in a new browser window 

e.g.

AR.context.openInBrowser(image.clickUrl);

Currently there is no easy way to workaround that behaviour. I recommend you to stick to a url but prepare a customized 'callforward.html' which you host on your own server. You can then use clickUrls the common way and e.g. pass over the phone number via GET param (yourserver.com/callforward.html?call=01234567). You can then read out the param in your JavaScript.

Best regards,
Andreas Hauser
Login or Signup to post a comment