package com.gaiagps.iburn.fragment;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;

import com.gaiagps.iburn.R;

public class FeedbackFragment extends Fragment {

    EditText feedbackView;

    public static FeedbackFragment newInstance() {
        FeedbackFragment fragment = new FeedbackFragment();
        return fragment;
    }

    public FeedbackFragment() {
        // Required empty public constructor
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {

        View root = inflater.inflate(R.layout.fragment_feedback, container, false);
        feedbackView = (EditText) root.findViewById(R.id.feedback);

        root.findViewById(R.id.feedbackButton).setOnClickListener(v -> {
            Intent emailIntent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts(
                    "mailto","support+42fb65d77b094805a8b42ac4a6e6a571@feedback.hockeyapp.net", null));
            emailIntent.putExtra(Intent.EXTRA_SUBJECT, "iBurn-Android feedback");
            emailIntent.putExtra(Intent.EXTRA_TEXT, feedbackView.getText());
            startActivity(Intent.createChooser(emailIntent, "Email Feedback"));
            feedbackView.setText("");
        });

        return root;
    }


}

@@ -302,17 +302,81 @@
 s.iburn.
-R
+BuildConfig;%0Aimport com.gaiagps.iburn.R;%0A%0Aimport java.util.Locale
 ;%0A%0Apubli
@@ -1091,24 +1091,265 @@
 feedback);%0A%0A
+        String appInfo = String.format(Locale.US, %22(Version: %25s %25s %25s %25d %25s)%5Cn%5Cn%22,%0A                BuildConfig.APPLICATION_ID, BuildConfig.BUILD_TYPE, BuildConfig.FLAVOR,%0A                BuildConfig.VERSION_CODE, BuildConfig.VERSION_NAME);%0A%0A
         root
@@ -1664,17 +1664,17 @@
 Android 
-f
+F
 eedback%22
@@ -1727,16 +1727,26 @@
 RA_TEXT,
+ appInfo +
  feedbac

Add app info to feedback email template