Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
can't open mail on iOS — Gideros Forum

can't open mail on iOS

albert988albert988 Member
edited July 2013 in General questions
I call this method in my game, application:openUrl("mailto:user@foo.com?subject=Test&body=Just a test")

it work well on Android, but on iOS, it work nothing.

Does anyone else have this problem?

Comments

  • ar2rsawseenar2rsawseen Maintainer
    @albert988 you need to url encode your string. As in, replace spaces with %20 like:
    application:openUrl("mailto:user@foo.com?subject=Test&body=Just%20a%20test")
  • tkhnomantkhnoman Member
    edited July 2013
    Or simply use this for subject and body's string:
     
    function encode_parameter(str)
    		return str:gsub('[^-%._~a-zA-Z0-9]',function(c)
    				return string.format("%%%02x",c:byte()):upper()
    		end)
    end
    Umm... I forgot where i get this code from. Might be when i'm working with oAuth.
Sign In or Register to comment.