how to send email with startActivity?

85 views
Skip to first unread message

mody ahmed

unread,
May 13, 2015, 3:13:53 AM5/13/15
to python-fo...@googlegroups.com

How can I do that?please can someone help me? I tried to do that
import android
droid = android.Android()
e=droid.getLaunchableApplications().result
action="android.intent.action.SENDTO"
extras={}
extras["android.intent.extra.TEXT"]="HI AM USING PYTHON"
uri="smart...@gmail.com"
package=e["Gmail"]
intent=droid.makeIntent(action,uri,None,extras,None,package,None,None).result
droid.starActivityForResult(intent)

mody ahmed

unread,
May 16, 2015, 4:34:42 PM5/16/15
to python-fo...@googlegroups.com
Ok I got it


import android
droid=android.Android()
e=droid.getLaunchableApplications().result
pg=e["Gmail"]
extras={}
extras["android.intent.extra.EMAIL"]="smart...@gmail.com"
extras["android.intent.extra.SUBJECT"]="hello test"
extras["android.intent.extra.TEXT"]="I'M USING QPYTHON"
uri="mailto:smart...@gmail.com"
droid.startActivity('android.intent.action.SENDTO', uri,None,extras,False,pg)
Reply all
Reply to author
Forward
0 new messages