Created
August 1, 2012 06:55
-
-
Save yava555/3224361 to your computer and use it in GitHub Desktop.
UserEmailFeedbackIntent
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
String subject = "鲜果联播Android版" + getResources().getString(R.string.app_version) + "用户反馈"; | |
Intent backIntent = new Intent(Intent.ACTION_VIEW); | |
String email_address="mailto:"+"lianbo.xianguo@gmail.com"; | |
backIntent.setData(Uri.parse(email_address)); | |
String networkStatus = ""; | |
if (CommonUtils.isWifiConnected(XgPadPreferenceActivity.this)) { | |
networkStatus = "WI-FI"; | |
} else if (CommonUtils.isNetworkConnected(XgPadPreferenceActivity.this)) { | |
networkStatus = "2G/3G"; | |
} | |
String feedContent= | |
"\n\n=================="+ | |
"\n操作系统:Android "+android.os.Build.VERSION.RELEASE + | |
"\n设备名称:"+android.os.Build.MANUFACTURER+" "+android.os.Build.MODEL+ | |
"\n生产厂商:"+android.os.Build.MANUFACTURER+ | |
"\n网络环境:"+networkStatus+ | |
"\n=================="; | |
backIntent.putExtra(Intent.EXTRA_TEXT, feedContent); | |
backIntent.putExtra(Intent.EXTRA_SUBJECT, subject); | |
try { | |
startActivity(backIntent); | |
} catch (ActivityNotFoundException e) { | |
Toast.makeText(getApplicationContext(), getResources().getString(R.string.email_account_not_found), 0).show(); | |
e.printStackTrace(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment