Created
July 25, 2015 14:13
-
-
Save TheFinestArtist/217b53a52721fdff9282 to your computer and use it in GitHub Desktop.
EmailHelper.java
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
import android.content.Context; | |
import android.content.Intent; | |
/** | |
* Created by TheFinestArtist | |
*/ | |
public class EmailHelper { | |
public static void sendSupportMail(Context context) { | |
Intent i = new Intent(Intent.ACTION_SEND); | |
i.setType("message/rfc822"); | |
i.putExtra(Intent.EXTRA_EMAIL, new String[]{Urls.EMAIL}); | |
i.putExtra(Intent.EXTRA_SUBJECT, "[FEEDBACK] Android App (" + BuildConfig.VERSION_NAME + ")"); | |
i.putExtra(Intent.EXTRA_TEXT, ""); | |
try { | |
context.startActivity(Intent.createChooser(i, "Send Feedback")); | |
} catch (android.content.ActivityNotFoundException e) { | |
e.printStackTrace(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment