I have an existing project of email client based on k-9 mail, I have the following requirement :
1. Handle "Doze mode" on newer Android devices(Android 6.0 and above). Doze mode is the cause of the app showing the "syncing disabled" message and preventing it from syncing mails in the background.
2. Requesting Permissions at Run Time
Documentation : [url removed, login to view]
3. GMAIL accounts setup with Oauth2