From 7cdbe48ff1454e4190081df39e385ce182de54a5 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 2 Dec 2020 19:07:34 +0100 Subject: [PATCH] Gmail app password --- .../main/java/eu/faircode/email/FragmentGmail.java | 13 +++++++++++++ app/src/main/res/layout/fragment_gmail.xml | 13 ++++++++++++- app/src/main/res/values/strings.xml | 1 + 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentGmail.java b/app/src/main/java/eu/faircode/email/FragmentGmail.java index f410283730..abaa436b4a 100644 --- a/app/src/main/java/eu/faircode/email/FragmentGmail.java +++ b/app/src/main/java/eu/faircode/email/FragmentGmail.java @@ -29,6 +29,7 @@ import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.database.Cursor; +import android.graphics.Paint; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.net.Uri; @@ -73,6 +74,8 @@ public class FragmentGmail extends FragmentBase { private Button btnSelect; private ContentLoadingProgressBar pbSelect; + private TextView tvAppPassword; + private TextView tvError; private Button btnSupport; @@ -95,6 +98,8 @@ public class FragmentGmail extends FragmentBase { btnSelect = view.findViewById(R.id.btnSelect); pbSelect = view.findViewById(R.id.pbSelect); + tvAppPassword = view.findViewById(R.id.tvAppPassword); + tvError = view.findViewById(R.id.tvError); btnSupport = view.findViewById(R.id.btnSupport); @@ -143,6 +148,14 @@ public class FragmentGmail extends FragmentBase { } }); + tvAppPassword.setPaintFlags(tvAppPassword.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG); + tvAppPassword.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Helper.viewFAQ(v.getContext(), 6); + } + }); + btnSupport.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { diff --git a/app/src/main/res/layout/fragment_gmail.xml b/app/src/main/res/layout/fragment_gmail.xml index 9b9325bf90..2c73b16b4e 100644 --- a/app/src/main/res/layout/fragment_gmail.xml +++ b/app/src/main/res/layout/fragment_gmail.xml @@ -104,6 +104,17 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/btnSelect" /> + + + app:layout_constraintTop_toBottomOf="@id/tvAppPassword" /> Please grant permissions to select an account and read your name Google will ask for permissions to read, compose, send and permanently delete all your email. FairEmail will never delete your messages without your explicit consent. If the drafts folder is not accessible by IMAP, this can be fixed in the Gmail label settings + I want to authorize an account with a password Microsoft does not provide this type of authorization for Outlook, Live, Hotmail, etc accounts The error \'AUTHENTICATE failed\' can be caused by IMAP/SMTP being disabled by the system administrator Authorize access to your %1$s account