mirror of
https://github.com/ProtonMail/protoncore_android.git
synced 2026-05-15 09:50:41 +00:00
Report
The report module allows a user to send bug reports.
Once a report is written, and user submits it, it is enqueued into a WorkManager. The report is sent whenever an Internet connection is available. By default, once a report is enqueued, from the user perspective it is considered as sent, and the Bug Report activity will be finished.
Quickstart
- Add
me.proton.core:report-presentationmodule. - If you use Hilt, add
me.proton.core:report-daggermodule. - Optionally, add
BugReportActivityto yourAndroidManifest.xmlfile, replacing_ProtonApp_withCalendar,Drive,MailorVpn(by default it usesProtonTheme):
<activity
android:name="me.proton.core.report.presentation.ui.BugReportActivity"
android:theme="@style/ProtonTheme._ProtonApp_"
tools:replace="android:theme" />
- Make sure WorkManager is configured:
- add WorkManager as your dependency
- configure
WorkManagerto be available in Hilt (i.e. yourApplicationshould implementandroidx.work.Configuration.Provider) - provide a
WorkManagerinstance from your dagger module
- Whenever you want to display a Bug Report screen, use ReportOrchestrator.
- Refer to ReportsViewModel from CoreExample app for sample usage.