uri does not work on android app

This forum contains topics that were moved from Get Satisfaction
Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

uri does not work on android app

Post 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.

Serhii Kulibaba
Posts: 147
Joined: Tue Aug 27, 2013 1:47 pm

uri does not work on android app

Post by Serhii Kulibaba »

Hello Terry,

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

Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

uri does not work on android app

Post 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

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

uri does not work on android app

Post by Evgene Karachevtsev »

Hello Terry,

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

Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

uri does not work on android app

Post by Terry Gilliver »

How do i do this?

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

uri does not work on android app

Post 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.

Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

uri does not work on android app

Post by Terry Gilliver »

no problem, i found it

Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

uri does not work on android app

Post 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

Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

uri does not work on android app

Post by Terry Gilliver »

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

Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

uri does not work on android app

Post 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?

Post Reply