Page 1 of 2

uri does not work on android app

Posted: Wed Oct 11, 2017 1:19 pm
by Terry Gilliver

I have a link in a html component of a jQuery mobile app. It is of the form:

<a href="mailto:a href="mailto:info@xxx.co.uk" rel="nofollow"info@xxx.co.uk/a" target="_blank">a href="mailto:info@xxx.co.uk" rel="nofollow"info@xxx.co.uk/a</a>

In a pc browser, it opens the default email client. As an android app, itdoes nothing. Is there anyway to open up the default email client on the android phone?

I have also tried it without the target attribute.


uri does not work on android app

Posted: Thu Oct 12, 2017 10:25 am
by Serhii Kulibaba

Hello Terry,

Please check the 3rd-part Cordova plugin for that, like: https://github.com/hypery2k/cordova-e...


uri does not work on android app

Posted: Mon Oct 16, 2017 11:59 am
by Terry Gilliver

Ok, I have uploaded the plugin to appery and looked for an option to import into my app. According to your docs:
Image

unfortunately there is no app setingscordova plugins section see below:

Image

The following shows that the plugin has been uploaded:
Image


uri does not work on android app

Posted: Mon Oct 16, 2017 12:08 pm
by Evgene Karachevtsev

Hello Terry,

Please upgrade your Appery.io library version to get this option (we recommend to use the latest version).


uri does not work on android app

Posted: Mon Oct 16, 2017 12:27 pm
by Terry Gilliver

How do i do this?


uri does not work on android app

Posted: Mon Oct 16, 2017 12:30 pm
by Evgene Karachevtsev

Dear Terry,

On the top of the first screenshot, you may find Libraries version window with selected version 2.3. Please select one of the latest versions.


uri does not work on android app

Posted: Mon Oct 16, 2017 12:32 pm
by Terry Gilliver

no problem, i found it


uri does not work on android app

Posted: Mon Oct 16, 2017 2:06 pm
by Terry Gilliver

Since updating this library, my exit function no longer works.

This is the code:
code
/**

  • Check for Phonegapp
    */
    var isPhoneGapApp = function () {
    return (document&#46;URL&#46;indexOf('http:&#47;&#47;') === -1 && document&#46;URL&#46;indexOf('https:&#47;&#47;') === -1);
    };

    if (isPhoneGapApp()) {
    navigator&#46;notification&#46;beep(1);
    if (navigator&#46;app) {
    navigator&#46;notification&#46;confirm(
    'Press Exit to terminate application',
    function(index) {
    if (index === 2) {
    navigator&#46;app&#46;exitApp();
    }
    },
    'Exit Application',
    ['Continue', 'Exit']
    );
    } else if (navigator&#46;device) {
    navigator&#46;notification&#46;confirm(
    'Press Exit to terminate application',
    function(index) {
    if (index === 2) {
    navigator&#46;device&#46;exitApp();
    }
    },
    'Exit Application',
    ['Continue', 'Exit']
    );
    }
    } else {
    window&#46;close();
    Alert('This device does not allow exit<br>Please close the app manually') &#47;&#47;since the browser can't be closed (otherwise this line would never run), ask the user to close the window
    }
    /code


uri does not work on android app

Posted: Mon Oct 16, 2017 2:15 pm
by Terry Gilliver

ok something weird is happening, it still works in appery tester. i will get back to you on this one


uri does not work on android app

Posted: Mon Oct 16, 2017 2:23 pm
by Terry Gilliver

I built the app again and retried it on my phone. The exit button does nothing on the installed app, but it works in the appery tester. Any ideas?