From 582ce275dbb148ae9bc8492ff7225d06c2fe1a4a Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 14 Feb 2019 13:28:14 +0000 Subject: [PATCH] Added automation support --- FAQ.md | 23 +++++++++- app/src/main/AndroidManifest.xml | 7 +++ .../eu/faircode/email/FragmentOptions.java | 25 +++++++++- .../eu/faircode/email/ServiceExternal.java | 46 +++++++++++++++++++ .../eu/faircode/email/ServiceSynchronize.java | 3 ++ app/src/main/res/layout/fragment_options.xml | 30 ++++++------ 6 files changed, 115 insertions(+), 19 deletions(-) create mode 100644 app/src/main/java/eu/faircode/email/ServiceExternal.java diff --git a/FAQ.md b/FAQ.md index dc1a93fdda..1fd9481e91 100644 --- a/FAQ.md +++ b/FAQ.md @@ -136,7 +136,8 @@ FairEmail follows all the best practices for an email client as decribed in [thi * [(74) Why do I see duplicate messages?](#user-content-faq74) * [(75) Can you make an iOS, Windows, etc version?](#user-content-faq75) * [(76) What does 'Clear local messages' ?](#user-content-faq76) -* [(77) Why are messages sometimes shown with a small delay?](#user-content-faq76) +* [(77) Why are messages sometimes shown with a small delay?](#user-content-faq77) +* [(78) How do I use schedules?](#user-content-faq78) [I have another question.](#support) @@ -1241,6 +1242,26 @@ so there is little room for performance improvements.
+ +**(78) How do I use schedules?** + +In the advanced options you can enable scheduling and set the time to turn synchronizing automatically on and off. + +An end time equal to or earlier than the start time is considered to be 24 hours later. + +You can also automate turning synchronization on and off by sending these commands to FairEmail: + +``` +(adb shell) am startservice -a eu.faircode.email.ENABLE +(adb shell) am startservice -a eu.faircode.email.DISABLE +``` + +Sending these commands will automatically turn scheduling off. + +Scheduling is a pro feature. + +
+ ## Support If you have another question, want to request a feature or report a bug, you can use [this forum](https://forum.xda-developers.com/android/apps-games/source-email-t3824168). diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 44448bc9e6..ab56ac0a4f 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -163,6 +163,13 @@ + + + + + + + - + app:layout_constraintTop_toBottomOf="@id/tvEnabledHint" + app:switchPadding="12dp" /> + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/swSchedule" /> + app:layout_constraintStart_toEndOf="@id/tvScheduleStart" + app:layout_constraintTop_toTopOf="@id/tvScheduleStart" /> + app:layout_constraintStart_toEndOf="@id/tvScheduleSeparator" + app:layout_constraintTop_toTopOf="@id/tvScheduleStart" /> + app:layout_constraintTop_toBottomOf="@id/tvScheduleStart" />