-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #150 from grammatek/v1.3.x
V1.3.x: merge latest changes to master
- Loading branch information
Showing
7 changed files
with
31 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,22 +18,26 @@ public void onCreate(Bundle savedInstanceState) { | |
|
||
protected void sendEmail() { | ||
Log.v(LOG_TAG, "Send email"); | ||
String recipientEmail = "[email protected]"; | ||
String subject = getString(R.string.email_subject); | ||
String msg = getString(R.string.email_message); | ||
final String recipientEmail = "[email protected]"; | ||
final String subject = getString(R.string.email_subject); | ||
final String msg = getString(R.string.email_message); | ||
Intent emailIntent = new Intent(Intent.ACTION_SENDTO); | ||
emailIntent.setData(Uri.parse("mailto:" + recipientEmail)); | ||
emailIntent.setData(Uri.parse("mailto:")); | ||
emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[] {recipientEmail}); | ||
emailIntent.putExtra(Intent.EXTRA_SUBJECT, subject); | ||
emailIntent.putExtra(Intent.EXTRA_TEXT, msg); | ||
|
||
String sendMsg = getString(R.string.send_message); | ||
final String sendMsg = getString(R.string.send_message); | ||
try { | ||
startActivity(Intent.createChooser(emailIntent, sendMsg)); | ||
finish(); | ||
if (emailIntent.resolveActivity(getPackageManager()) != null) { | ||
startActivity(Intent.createChooser(emailIntent, sendMsg)); | ||
} else { | ||
Toast.makeText(this, R.string.no_email_client, Toast.LENGTH_LONG).show(); | ||
} | ||
Log.i("Finished sending email...", ""); | ||
} catch (android.content.ActivityNotFoundException ex) { | ||
Toast.makeText(EmailFeedback.this, "There is no email client installed.", Toast.LENGTH_SHORT).show(); | ||
Toast.makeText(this, R.string.no_email_client, Toast.LENGTH_LONG).show(); | ||
} | ||
finish(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters