capacitor-plugin-status-bar 2.0.9 → 2.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -512,11 +512,13 @@ public class CapacitorStatusBar extends Plugin {
512
512
  private void applyNavigationBarBackground(Activity activity, @ColorInt int color) {
513
513
  Log.d(TAG, "applyNavigationBarBackground: color=#" + Integer.toHexString(color) + ", API="
514
514
  + Build.VERSION.SDK_INT);
515
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
516
- // Android 12+: Use overlay views (gesture nav ignores setNavigationBarColor; mandatory on 15+)
515
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) {
516
+ // Android 15+ (API 35+): edge-to-edge enforced, setNavigationBarColor() is a no-op
517
517
  ensureNavBarOverlay(activity, color);
518
518
  } else {
519
- // Android < 12: Use native window API directly
519
+ // API 29–34: setNavigationBarColor() works for button navigation.
520
+ // Gesture navigation ignores it (system enforces transparency for gesture handles),
521
+ // but in that case there is no visible nav bar to color anyway.
520
522
  activity.getWindow().setNavigationBarColor(color);
521
523
  }
522
524
  }
@@ -647,17 +649,8 @@ public class CapacitorStatusBar extends Plugin {
647
649
  navBarOverlay.setBackgroundColor(Color.TRANSPARENT);
648
650
  Log.d(TAG, "makeStatusBarBackgroundTransparent: nav bar overlay made transparent");
649
651
  }
650
- } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
651
- // Android 12–14: status bar uses native API, nav bar uses overlay
652
- window.setStatusBarColor(Color.TRANSPARENT);
653
- Log.d(TAG, "makeStatusBarBackgroundTransparent: status bar color set transparent (native)");
654
- View navBarOverlay = decorView.findViewWithTag(NAV_BAR_OVERLAY_TAG);
655
- if (navBarOverlay != null) {
656
- navBarOverlay.setBackgroundColor(Color.TRANSPARENT);
657
- Log.d(TAG, "makeStatusBarBackgroundTransparent: nav bar overlay made transparent");
658
- }
659
652
  } else {
660
- // Android < 12: both bars use native window API
653
+ // API 29–34: both bars use native window API
661
654
  window.setStatusBarColor(Color.TRANSPARENT);
662
655
  window.setNavigationBarColor(Color.TRANSPARENT);
663
656
  Log.d(TAG, "makeStatusBarBackgroundTransparent: set native bar colors to transparent");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "capacitor-plugin-status-bar",
3
- "version": "2.0.9",
3
+ "version": "2.0.10",
4
4
  "description": "Capacitor plugin for managing the status bar style, visibility, and color on iOS and Android. Control overlay modes, background colors, and appearance for native mobile applications.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",