Hello everyone, I’m an Android develoer.
when I used org.mozilla.geckoview:geckoview
in the Android application to load html under local assets folder, I tried to call the WebExtensionController.install method to load a remote or local signed xpi file.
In the callback of onInstallPrompt, I manually returned GeckoResult.allow()
The log shows that the extension was installed successfully, similar to
Extension installed: WebExtension {location=resource://android/assets/aaa.xpi, id=messaging2@example.com, flags=0},
but this flags=0
means that I cannot Call browser.runtime.connectNative("xxx")
I have already specified the required permissions when making xpi in the manifest.json
"permissions": [
"nativeMessaging",
"nativeMessagingFromContent",
"geckoViewAddons",
"<all_urls>"
]
The strange thing is that if I directly use the source code for making xpi, this problem will not occur.