Android dynamically added livelinks not working


i'm using phonegap 5.5.0, , trying dynamically add anchor links based on ajax json response data, using example code snippet:

 

html:

 

    <div class="profiledata col-xs-12 col-sm-6" id="phonenumber">

        <figure><img id="phonenumberimage" alt="phone number" src="img/profile_picto_phone.png"/></figure>

        <span></span>

    </div>

 

jquery:

 

    $("#phonenumber span").append("<a>" + data.profile.tel + "</a>").click(function() {

        window.location.href = 'tel:' + data.profile.tel;

    });

 

this works fine in ios, , works in android hardcoded link using no jquery this:

 

    <a onclick="window.location.href='tel:12345678'">12345678</a>

 

it's links not interpreted anymore because they're being added dynamically. tried adding .trigger('create') other posts suggested no success. links appear in android app, clicking on triggers nothing. no logs in android studio except for:

 

    v/webviewinputdispatcher: blockwebkitdraw

    v/webviewinputdispatcher: blockwebkitdraw lockedfalse

    d/webview: blockwebkitviewmessage= false

 

my phonegap config.xml contains:

 

    <allow-intent href="tel:*" />

    <allow-intent href="mailto:*" />

    <uses-permission android:autolink="email" />

    <uses-permission android:autolink="phone" />

are there logs in javascript console? (chrome://inspect device attached , configured usb debugging)



More discussions in PhoneGap


adobe

Comments

Popular posts from this blog

Soustraire une selection

After Effects: could not find dvaeve_dialogs.txt

Illustrator cs6 "Invalid Serial Number"