Reputation: 75
I'm making an Android app that is a basic user-input feedback form, and at the end, there is a submit button. First, I can't figure out how to make the button active, but I also want to format it so that the person's name that they gave is the subject to an email it would send me. I basically want the information they input to come to me as an email, and I'm confused how to implement this. Thanks!
Upvotes: 3
Views: 5143
Reputation: 1
I am an Android phone user seeking the help of Google/Android to overcome the menace of mobile phone spam messages (sms & mms) sent by telcos and third parties with permission of telcos. The current spam messages fltering function in Android can only block mobile numbers (not alphabet-type shortcodes) after the mobile numbers have been used to send spam messages.
It does not prevent third party spammers from registering new simcards nor telcos from sending spam messages using alphabet-type shortcodes.
I have an idea on how Android’s spam messages filtering function can be changed (new approach) that wil make it useless for third party spammers to register new simcards to send spam messages and prevent telcos from using alphabet-type shortcodes to send spam messages.
Please give me the email address of the right person in Google/Android so that I can explain my idea of improving Android’s spam messages filtering function or forward this email to that person and ask him/her to contact me.
Upvotes: 0
Reputation: 1655
Assuming you have a Button
called mBtnFeedback
in "FeedbackActivity.java", you can dynamically add the following to register the basic feedback functionality:
mBtnFeedback.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
String to = textTo.getText().toString();
String message = textMessage.getText().toString();
String subject = textSubject.getText().toString();
Intent mEmail = new Intent(Intent.ACTION_SEND);
mEmail.putExtra(Intent.EXTRA_EMAIL, new String[]{ to});
mEmail.putExtra(Intent.EXTRA_SUBJECT, subject);
mEmail.putExtra(Intent.EXTRA_TEXT, message);
// prompts to choose email client
mEmail.setType("message/rfc822");
startActivity(Intent.createChooser(mEmail, "Choose an email client to send your feedback!"));
}
});
For more information about rfc822
, please refer to this Wikipedia page.
Upvotes: 4
Reputation: 13541
Step 1) Take the form data
Step 2) Organize your form data
Step 3) Organize an intent and pass in the respective extras for your content (read the documentation on Intent.SEND_TO)
After this is all completed, you will achieve your result.
Upvotes: 0