From 36ddedd3df6d168539648ba9e8e5ad8d96ebac66 Mon Sep 17 00:00:00 2001 From: Timothy <6560631+TimoPtr@users.noreply.github.com> Date: Thu, 10 Apr 2025 12:43:22 +0200 Subject: [PATCH] Add android developer playground tip (#2642) --- docs/android/tips/dev_playground.md | 21 +++++++++++++++++++++ sidebars.js | 1 + 2 files changed, 22 insertions(+) create mode 100644 docs/android/tips/dev_playground.md diff --git a/docs/android/tips/dev_playground.md b/docs/android/tips/dev_playground.md new file mode 100644 index 00000000..44f22207 --- /dev/null +++ b/docs/android/tips/dev_playground.md @@ -0,0 +1,21 @@ +--- +title: "Developer playground" +sidebar_label: "Developer playground" +--- + +## Why a developer playground? + +The application relies heavily on the WebView and an active connection to a server, making it challenging to quickly test features during development. Often, you may need to rebuild the app multiple times to test specific behaviors. While the **Compose preview** capabilities can help with UI testing, they are sometimes insufficient, requiring you to go through the whole UX flow that can be tedious. + +To save time during development, we’ve created a **developer playground**. This playground is accessible only in debug builds through an application [shortcut](https://developer.android.com/develop/ui/views/launch/shortcuts/creating-shortcuts#static). This ensures it does not interfere with the rest of the application. + +:::note +The playground code is located in the `app/src/debug` sourceSet. +::: + +You are free to use the playground as needed, but only commit changes if they provide value to other developers. When committing changes to the playground, ensure you follow the [codestyle](/docs/android/codestyle) and [best practices](/docs/android/best_practices.md). Translations, however, can be omitted. + +### Examples of valuable contributions + +- A method to intentionally crash the application to test error reporting in the cache folder. +- A tool to display all components and themes used within the application. diff --git a/sidebars.js b/sidebars.js index da54e5ae..207e1a05 100644 --- a/sidebars.js +++ b/sidebars.js @@ -348,6 +348,7 @@ module.exports = { "android/tips/fcm_push_notification", "android/tips/sarif_reports", "android/tips/release", + "android/tips/dev_playground", ], }, "android/best_practices",