<commit_before>MirandaFeedback
===============

Feedback dialog for Android apps.

To demo, update MirandaDemo.java and replace <EMAIL> with your email account, PASSWORD with that email account's password, and <EMAIL> with the email that will recieve the content of the feedback form. 

Make sure to add these two permissions to your AndroidManifest

  <uses-permission android:name="android.permission.INTERNET" />
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /><commit_msg>Updated ReadMe to reflect new Demo<commit_after>MirandaFeedback
===============

Feedback dialog for Android apps.

Usage
-------------------------
The demo app uses a few conditional check statements from the app to build a MirandaFeedback Dialog as so:
<pre>
  MirandaFeedback dialog = new MirandaFeedback(MirandaDemo.this);
  // setEmail is required (from email must be a gmail acct)
  // for app simplicity we reuse the to/from emails
  dialog.setEmail(email, password, "Feedback from MirandaFeedbackDemo", email);
  // Sets app name
  if (!appName.isEmpty())
    dialog.setAppName(appName);
  // Replaces dialog title entirely
  if (!dialogTitle.isEmpty())
    dialog.setDialogTitle(dialogTitle);
  switch (mEmailType.getCheckedRadioButtonId()) {
  // HTML by default
    case R.id.plain_text:
       dialog.setTextEmail(true);
       break;
  }
  if (mOptName.isChecked())
    dialog.addField("Name");
  if (mOptEmail.isChecked())
    dialog.addField("Email");
  // displays the dialog
  dialog.show();
</pre>

But a real use case may be to build the dialog, and to display it once a user clicks on your feedback widget as follows:
<pre>
  MirandaFeedback dialog = new MirandaFeedback(getActivity())
    .setEmail(<EMAIL>, PASSWORD, "Feedback Response from MirandaFeedback", <EMAIL>)
    .setDialogTitle("What do you think about our app?")
    .addField("Email");

  feedbackWidget.setOnClickListener(new OnClickListener() {
    @Override
    public void onClick(View view) {
      dialog.show();
    }
  });
</pre>
{'fraction_non_alphanumeric': 0.11950617283950617, 'fraction_numerical': 0.0, 'mean_word_length': 4.052369077306733, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1577871', 'n_tokens_mistral': 583, 'n_tokens_neox': 560, 'n_words': 198}