Merge pull request #435 from svendroid/webintents-email

Android Webintents Emailaddress
This commit is contained in:
macdonst
2012-04-02 09:17:59 -07:00
2 changed files with 5 additions and 2 deletions

View File

@@ -130,8 +130,10 @@ public class WebIntent extends Plugin {
//allowes sharing of images as attachments.
//value in this case should be a URI of a file
i.putExtra(key, Uri.parse(value));
}
else {
} else if(key.equals(Intent.EXTRA_EMAIL)){
//allows to add the email address of the receiver
i.putExtra(Intent.EXTRA_EMAIL, new String[]{value});
} else {
i.putExtra(key, value);
}
}

View File

@@ -12,6 +12,7 @@ WebIntent.ACTION_VIEW= "android.intent.action.VIEW";
WebIntent.EXTRA_TEXT = "android.intent.extra.TEXT";
WebIntent.EXTRA_SUBJECT = "android.intent.extra.SUBJECT";
WebIntent.EXTRA_STREAM = "android.intent.extra.STREAM";
WebIntent.EXTRA_EMAIL = "android.intent.extra.EMAIL";
WebIntent.prototype.startActivity = function(params, success, fail) {
return PhoneGap.exec(function(args) {