6880bb0eb7 | ||
---|---|---|
.. | ||
dagger | ||
data | ||
domain | ||
presentation | ||
test | ||
README.md | ||
build.gradle.kts |
README.md
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-presentation
module. - If you use Hilt, add
me.proton.core:report-dagger
module. - Optionally, add
BugReportActivity
to yourAndroidManifest.xml
file, replacing_ProtonApp_
withCalendar
,Drive
,Mail
orVpn
(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
WorkManager
to be available in Hilt (i.e. yourApplication
should implementandroidx.work.Configuration.Provider
) - provide a
WorkManager
instance from your dagger module
- Whenever you want to display a Bug Report screen, use ReportOrchestrator.
- Refer to ReportsViewModel from CoreExample app for sample usage.