내 앱의 피드백 양식에 채워진 텍스트를 내 이메일 주소로 가져오는 방법은 무엇입니까? 자세한 내용을 참조하십시오 (How to get the text filled in feedback form of my app to my email address? Please see details)


문제 설명

내 앱의 피드백 양식에 채워진 텍스트를 내 이메일 주소로 가져오는 방법은 무엇입니까? 자세한 내용을 참조하십시오 (How to get the text filled in feedback form of my app to my email address? Please see details)

내 Android 앱에서 피드백 양식을 만들었습니다.

내가 원하는 것은 해당 양식(editText) 다른 앱을 열지 않고 내 이메일 주소로 전달되도록 합니다.

이 작업을 수행하는 방법을 알 수 없었지만 다음 방법을 생각했습니다. 지금까지:

EditText etUserLikeResponse = (EditText) findViewById(R.id.user_like_response);
        EditText etUserDontLikeResponse = (EditText) findViewById(R.id.user_dont_like_response);
        EditText etUserOtherFeaturesResponse = (EditText) findViewById(R.id.user_other_features_response);

        String etUserLikeResponseText = etUserLikeResponse.getText().toString();
        String etUserDontLikeResponseText = etUserDontLikeResponse.getText().toString();
        String etUserOtherFeaturesResponseText = etUserOtherFeaturesResponse.getText().toString();

        Uri etUserLikeResponseTextUri = Uri.parse(etUserLikeResponseText);
        Uri etUserDontLikeResponseTextUri = Uri.parse(etUserDontLikeResponseText);
        Uri etUserOtherFeaturesResponseTextUri = Uri.parse(etUserOtherFeaturesResponseText);

        final ArrayList<Uri> userResponseUri = new ArrayList<>();
        userResponseUri.add(etUserLikeResponseTextUri);
        userResponseUri.add(etUserDontLikeResponseTextUri);
        userResponseUri.add(etUserOtherFeaturesResponseTextUri);

        Button btnSendFeedback = (Button) findViewById(R.id.btn_send_feedback);
        btnSendFeedback.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                final Handler handler2 = new Handler();
                handler2.postDelayed(new Runnable() {
                    @Override
                    public void run() {
                        Intent userFeedbackIntent = new Intent();
                        userFeedbackIntent.setAction(Intent.ACTION_SEND_MULTIPLE);
                        userFeedbackIntent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, userResponseUri);
                        userFeedbackIntent.setType("message/rfc822");
                        userFeedbackIntent.putExtra(Intent.EXTRA_EMAIL, new String[]{"abc.xyz321ba@gmail.com"});
                        startActivity(userFeedbackIntent);
                    }
                }, 200);
            }
        });

처음에 EditText로 작성된 텍스트를 캡처했습니다. & 그런 다음 http: //developer.android.com/training/sharing/send.html

내가' btnSendFeedback을 클릭하고 Gmail을 선택하면 '파일을 첨부할 수 없습니다'라는 메시지가 표시됩니다.

저는 초보자입니다. 제가 뭘 잘못하고 있는지 알 수 없습니다.

알려주세요 & 이 작업을 수행할 수 있는 또 다른 좋은 방법이 있다면 알려주세요.

질문 형식이 잘못되어 죄송합니다.

감사합니다.


참조 솔루션

방법 1:

Ok, seems like you are using Intent.EXTRA_STREAM which involves a 'file', and you don't have any file, don't you? (check this answer: Android: Intent.ACTION_SEND with EXTRA_STREAM doesn't attach any image when choosing Gmail app on htc Hero), So you can create a txt file and then try to attach it to your email.

Other option can be just fill the body of your email (check: Send Email Intent ) with the data that you want to send.


Update : If you want to send an email with the data in the body of your email see Developer.android.com: Email intent

And if you want to avoid other app in the procces you can check this so answer: Sending email in android using javamail api without using the default built in app

(by user4909407mayo)

참조 문서

  1. How to get the text filled in feedback form of my app to my email address? Please see details (CC BY‑SA 2.5/3.0/4.0)

#android-intent #android-sharing #Android #java






관련 질문

인텐트를 사용하여 메시지 작성 열기 (Opening create message using an intent)

다른 데이터로 일부 인텐트를 생성하더라도 알림에서 동일한 추가 데이터를 얻습니다. (I get the same extra data from notifications even if I create some intents with different data)

내 앱의 피드백 양식에 채워진 텍스트를 내 이메일 주소로 가져오는 방법은 무엇입니까? 자세한 내용을 참조하십시오 (How to get the text filled in feedback form of my app to my email address? Please see details)

Android 이미지 갤러리 이미지 자르기 및 ImageView 설정 (Android Image Gallery Crop Image and set ImageView)

xamarin에서 Android 활동 간에 데이터를 전달할 수 없습니다. (Can't pass data between android activities in xamarin)

모든 애플리케이션에 대한 Android 앱에서 데이터 공유 (Share Data in android app for all applications)

zxing이 브라우저에서 URL을 열도록 하거나 스캔 후 번호를 다이얼하는 방법 (How to make zxing open a URL in a browser or dial a number after scanning)

Android 암시적 의도 유효성 검사 (Android implicit intents validation)

kaldi 설치 시 libmkl_tbb_thread.so sth 관련 문제 (A problem related to libmkl_tbb_thread.so sth when installing kaldi)

Intent를 통해 데이터 전달 및 수신 (Passing data through Intent and receiving it)

android studio에서 인텐트를 통해 여러 콘텐츠를 보내는 방법 (how can i send multiple contents through intent in android studio)

Kotlin의 다른 EditText 값에 대한 의도 EditText 값 (Intent EditText values to another EditText values in Kotlin)







코멘트