mailto links on android devices

mailto links on android devices

Posted by: Minh Ha | September 2, 2015
Recently we added a feature that uses the mailto link. While testing it was found that working fine on Desktops, iPhones, and iPad’s but not on android devices. To debug it quickly, we created a test page with just mailto link in it as shown below
1
<a href="mailto:someone@example.com?Subject=Hello%20again" target="_blank">Send Mail</a>
and then tested this test page, and guess what it works with the android device!!!.
So, this means that something is different or special in the actual (application’s) HTML. After investigating further, we realized that the ‘mailto’ link is placed within a nested iFrame instead of the top level page.

This concludes that this case was not getting handled on Android when mailto is within an iFrame.

Then to quickly try again, we updated the target attribute of the anchor tag to value “_top”. Miraculously it worked!!!
1
<a href="mailto:someone@example.com?Subject=Hello%20again" target="_top">Send Mail</a>
Hope this helps!!!
Source From tothenew

Comment