Mailto not working on Android mobile.

1,440 views
Skip to first unread message

Huy Tran Cam

unread,
Jan 4, 2016, 2:25:32 PM1/4/16
to phonegap
Hi,

I'm developing a mobile app using PhoneGap Desktop Beta V 0.2.1. Testing on Chrome browser, when I click on a href:mailto link, it opens my default email. But when I'm testing it using my mobile (Samsung Galaxy Note 2), the mailto link does not work. Please help. I'm using Jquery to develop it.

Kerri Shotts

unread,
Jan 4, 2016, 3:23:51 PM1/4/16
to phonegap
Not nearly enough information here.

I suspect a failure to configure the whitelist, but because there's no code presented (config.xml; javascript, etc.), it's difficult to know. For whitelist documentation, see https://www.npmjs.com/package/cordova-plugin-whitelist.

Huy Tran Cam

unread,
Jan 4, 2016, 3:47:12 PM1/4/16
to phonegap
Here is the code from the config.xml:
 <access origin="*"/>
    <access origin="mailto:*" launch-external="yes"/>
    <!--
       <access origin="http://phonegap.com" />                    - allow any secure requests to http://phonegap.com/
       <access origin="http://phonegap.com" subdomains="true" />  - same as above, but including subdomains, such as http://build.phonegap.com/
       <access origin="http://phonegap.com" browserOnly="true" /> - only allows http://phonegap.com to be opened by the child browser.
   -->
    <!-- Added the following intents to support the removal of whitelist code from base cordova to a plugin -->
    <!-- Whitelist configuration. Refer to https://cordova.apache.org/docs/en/edge/guide_appdev_whitelist_index.md.html -->
    <plugin name="cordova-plugin-whitelist" version="1" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <platform name="android">
        <allow-intent href="market:*" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
    </platform>
 
And the mailto link is like this <a href="mailto:huyt...@gmail.com">Please email me!</a>
When I test on Chrome, It opens my outlook email. But when I test with my phone, nothing happens. My phone has Email and Gmail app. Do you have any idea about it? Thank you for your help.
Vào 12:23:51 UTC-8 Thứ Hai, ngày 04 tháng 1 năm 2016, Kerri Shotts đã viết:

mayor

unread,
Jan 4, 2016, 4:40:04 PM1/4/16
to phonegap
I have just been testing this and it works fine here.  I am using cli-5.2.0 on PhoneGap Build and testing on my Samsung Galaxy Note 2.

Jesse Monroy

unread,
Jan 4, 2016, 4:49:45 PM1/4/16
to phonegap
@Huy,
when Kerri (or anyone) says you don't have enough information, that means do not answer the random
guess. Give use more information.

You still have not posted enough information.

Jesse
Reply all
Reply to author
Forward
0 new messages