Skip to content

Commit

Permalink
Merge pull request phonegap#435 from svendroid/webintents-email
Browse files Browse the repository at this point in the history
Android Webintents Emailaddress
  • Loading branch information
macdonst committed Apr 2, 2012
2 parents 5d63a5a + ac5297b commit df43f0f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Android/WebIntent/WebIntent.java
Expand Up @@ -130,8 +130,10 @@ void startActivity(String action, Uri uri, String type, Map<String, String> extr
//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);
}
}
Expand Down
1 change: 1 addition & 0 deletions Android/WebIntent/webintent.js
Expand Up @@ -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) {
Expand Down

0 comments on commit df43f0f

Please sign in to comment.