Skip to content

Commit 2d70bb4

Browse files
authored
docs: update README for v2.4.0 (#240)
* **Documentation** * Updated installation instructions for DebugOverlay version 2.4.0 * Added comprehensive guide for the shake-to-open feature * Consolidated and removed duplicate documentation sections
1 parent 5941e61 commit 2d70bb4

1 file changed

Lines changed: 27 additions & 21 deletions

File tree

README.md

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ DebugOverlay gives you a lightweight, always-available look into your app's runt
2828

2929
```kotlin
3030
// app/build.gradle.kts
31-
debugImplementation("com.ms-square:debugoverlay:2.3.0")
31+
debugImplementation("com.ms-square:debugoverlay:2.4.0")
3232

3333
// That's it! Overlay appears automatically on app launch.
3434
// Tap to open debug panel. Long-press to drag.
@@ -71,12 +71,13 @@ Add to `gradle/libs.versions.toml`:
7171

7272
```toml
7373
[versions]
74-
debugoverlay = "2.3.0"
74+
debugoverlay = "2.4.0"
7575

7676
[libraries]
7777
debugoverlay = { module = "com.ms-square:debugoverlay", version.ref = "debugoverlay" }
7878
debugoverlay-okhttp = { module = "com.ms-square:debugoverlay-extension-okhttp", version.ref = "debugoverlay" }
7979
debugoverlay-timber = { module = "com.ms-square:debugoverlay-extension-timber", version.ref = "debugoverlay" }
80+
debugoverlay-trigger-shake = { module = "com.ms-square:debugoverlay-extension-trigger-shake", version.ref = "debugoverlay" }
8081
```
8182

8283
Then in `app/build.gradle.kts`:
@@ -87,6 +88,7 @@ dependencies {
8788
// Optional extensions
8889
debugImplementation(libs.debugoverlay.okhttp)
8990
debugImplementation(libs.debugoverlay.timber)
91+
debugImplementation(libs.debugoverlay.trigger.shake)
9092
}
9193
```
9294

@@ -95,7 +97,7 @@ dependencies {
9597
```kotlin
9698
// app/build.gradle.kts
9799
dependencies {
98-
debugImplementation("com.ms-square:debugoverlay:2.3.0")
100+
debugImplementation("com.ms-square:debugoverlay:2.4.0")
99101
}
100102
```
101103

@@ -144,6 +146,23 @@ Button(onClick = { DebugOverlay.openPanel(context) }) {
144146

145147
`DebugOverlay.openPanel(context)` works in any mode, not just `Hidden` — call it from anywhere you'd like to launch the panel programmatically.
146148

149+
#### Shake to open
150+
151+
For a zero-config shake trigger, add the shake extension:
152+
153+
```kotlin
154+
dependencies {
155+
debugImplementation("com.ms-square:debugoverlay:2.4.0")
156+
debugImplementation("com.ms-square:debugoverlay-extension-trigger-shake:2.4.0")
157+
}
158+
```
159+
160+
Auto-installs via AndroidX Startup — shake the device to open the debug panel. Listening only happens while the app is foregrounded; the accelerometer is unregistered on background.
161+
162+
Heads-up: shake gestures might be claimed by other dev tools as well. Only add this dependency if you don't have a competing handler.
163+
164+
To disable auto-install, remove `ShakeTriggerInitializer` via manifest merger using the same pattern shown for the [Timber extension below](#timber-log-capture) (replace the `android:name` with `com.ms.square.debugoverlay.extension.trigger.shake.ShakeTriggerInitializer`).
165+
147166
### Custom tabs
148167

149168
Add app-specific tabs to the debug panel. Custom tabs appear after the built-in tabs:
@@ -162,8 +181,8 @@ DebugOverlay.configure {
162181

163182
```kotlin
164183
dependencies {
165-
debugImplementation("com.ms-square:debugoverlay:2.3.0")
166-
debugImplementation("com.ms-square:debugoverlay-extension-okhttp:2.3.0")
184+
debugImplementation("com.ms-square:debugoverlay:2.4.0")
185+
debugImplementation("com.ms-square:debugoverlay-extension-okhttp:2.4.0")
167186
}
168187
```
169188

@@ -194,8 +213,8 @@ val client = OkHttpClient.Builder()
194213

195214
```kotlin
196215
dependencies {
197-
debugImplementation("com.ms-square:debugoverlay:2.3.0")
198-
debugImplementation("com.ms-square:debugoverlay-extension-timber:2.3.0")
216+
debugImplementation("com.ms-square:debugoverlay:2.4.0")
217+
debugImplementation("com.ms-square:debugoverlay-extension-timber:2.4.0")
199218
}
200219
```
201220

@@ -221,19 +240,6 @@ To disable auto-plant, remove `TimberTreeStartupInitializer` via manifest merger
221240

222241
Then call `Timber.plant(DebugOverlayTimberTree())` manually.
223242

224-
### Shake to open the debug panel
225-
226-
```kotlin
227-
dependencies {
228-
debugImplementation("com.ms-square:debugoverlay:2.3.0")
229-
debugImplementation("com.ms-square:debugoverlay-extension-trigger-shake:2.3.0")
230-
}
231-
```
232-
233-
Auto-installs via AndroidX Startup — shake the device to open the debug panel. Listening only happens while the app is foregrounded; the accelerometer is unregistered on background.
234-
235-
To disable auto-install, remove `ShakeTriggerInitializer` via manifest merger using the same pattern shown for the Timber extension above (replace the `android:name` with `com.ms.square.debugoverlay.extension.trigger.shake.ShakeTriggerInitializer`).
236-
237243
### Bug Reporting
238244

239245
In `OverlayMode.FullMetrics`, tap the bug icon in the debug panel toolbar. In `OverlayMode.BugReporterOnly`, tap the bug reporter FAB. Generates a ZIP with:
@@ -332,7 +338,7 @@ android {
332338
}
333339

334340
dependencies {
335-
"releaseWithOverlayImplementation"("com.ms-square:debugoverlay:2.3.0")
341+
"releaseWithOverlayImplementation"("com.ms-square:debugoverlay:2.4.0")
336342
}
337343
```
338344

0 commit comments

Comments
 (0)