fix(android): edge to edge compatibility for capacitor7 (#10191)

This commit is contained in:
aki-chang-dev
2025-02-17 04:42:01 +00:00
parent 378007da81
commit 642559df4b
6 changed files with 29 additions and 14 deletions

View File

@@ -12,6 +12,7 @@ dependencies {
implementation project(':capacitor-app')
implementation project(':capacitor-keyboard')
implementation project(':capacitor-status-bar')
implementation project(':capawesome-capacitor-android-edge-to-edge-support')
implementation project(':capgo-inappbrowser')
}

View File

@@ -3,26 +3,24 @@ package app.affine.pro
import android.os.Build
import android.os.Bundle
import androidx.annotation.RequiresApi
import com.capacitorjs.plugins.keyboard.KeyboardPlugin
import com.capacitorjs.plugins.statusbar.StatusBarPlugin
import com.getcapacitor.BridgeActivity
import com.getcapacitor.plugin.CapacitorCookies
import com.getcapacitor.plugin.CapacitorHttp
import ee.forgr.capacitor_inappbrowser.InAppBrowserPlugin
class MainActivity : BridgeActivity() {
@RequiresApi(Build.VERSION_CODES.R)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
init {
registerPlugins(
listOf(
CapacitorHttp::class.java,
CapacitorCookies::class.java,
InAppBrowserPlugin::class.java,
KeyboardPlugin::class.java,
StatusBarPlugin::class.java,
)
)
}
@RequiresApi(Build.VERSION_CODES.R)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
}
}

View File

@@ -11,5 +11,8 @@ project(':capacitor-keyboard').projectDir = new File('../../../../../node_module
include ':capacitor-status-bar'
project(':capacitor-status-bar').projectDir = new File('../../../../../node_modules/@capacitor/status-bar/android')
include ':capawesome-capacitor-android-edge-to-edge-support'
project(':capawesome-capacitor-android-edge-to-edge-support').projectDir = new File('../../../../../node_modules/@capawesome/capacitor-android-edge-to-edge-support/android')
include ':capgo-inappbrowser'
project(':capgo-inappbrowser').projectDir = new File('../../../../../node_modules/@capgo/inappbrowser/android')