From a136ba3f3bcc0a3551e3ab177993c531a963f818 Mon Sep 17 00:00:00 2001 From: Andre Destro Date: Wed, 5 Aug 2026 16:54:44 +0100 Subject: [PATCH] docs: add Android deprecated API removals to Capacitor 9 upgrade guide --- docs/main/updating/9-0.md | 25 +++++++++++++++++++++++++ sidebars.js | 1 + 2 files changed, 26 insertions(+) create mode 100644 docs/main/updating/9-0.md diff --git a/docs/main/updating/9-0.md b/docs/main/updating/9-0.md new file mode 100644 index 00000000..5e10ecf7 --- /dev/null +++ b/docs/main/updating/9-0.md @@ -0,0 +1,25 @@ +--- +title: Updating to 9.0 +description: Guide for updating Capacitor from v8 to v9 in your app +slug: /updating/9-0 +--- + +# Updating from Capacitor 8 to Capacitor 9 + +In this guide, you'll find steps to update your project to the current Capacitor 9 version as well as a list of breaking changes. + +## Breaking changes in @capacitor/android + +Capacitor 9 removes the Java APIs that were deprecated in previous major versions. If your app or plugin still uses any of them, replace them as follows. + +| Removed | Replacement | +| :------ | :---------- | +| `CapConfig(AssetManager, JSONObject)` constructor | `CapConfig.loadDefault(Context)` to load from `capacitor.config.json`, or `CapConfig.Builder` for embedded use | +| `CapConfig.getObject(String)`, `getString(...)`, `getBoolean(...)`, `getInt(...)`, `getArray(...)` | The typed getters on `CapConfig` for main config values and the `PluginConfig` accessors for plugin config values | +| `PluginCall.save()` | `setKeepAlive(true)` | +| `PluginCall.isSaved()` | `isKeptAlive()` | +| `PluginCall.hasOption(String)` | Typed accessors (`getString(...)`, `getInt(...)`, etc.) | +| `PluginCall.isReleased()` | No replacement, released calls are managed by the bridge | +| `Bridge.CAPACITOR_HTTPS_INTERCEPTOR_START` | `CAPACITOR_HTTP_INTERCEPTOR_START`, all proxied requests are handled by it | +| `Plugin.getConfigValue(String)` | `getConfig()` and the typed accessors on `PluginConfig` | +| `MessageHandler(Bridge, WebView, Object)` constructor | `MessageHandler(Bridge, WebView)` | diff --git a/sidebars.js b/sidebars.js index e29ff7ec..5030da0b 100644 --- a/sidebars.js +++ b/sidebars.js @@ -32,6 +32,7 @@ module.exports = { label: 'Upgrade Guides', collapsed: false, items: [ + 'main/updating/9-0', 'main/updating/8-5', 'main/updating/8-0', 'main/updating/plugins/8-0',