Closed bangonkali closed 5 years ago
Seems like the cause could be https://developer.android.com/reference/java/util/Optional not being supported on API level 23 which is the Device I'm currently testing with. Will update as soon as I test with a more recent device.
I can now confirm this is indeed an issue with API level 23
and below. It works perfectly well with Android API level 24
and above.
Some background info. We're looking in to moving from a legacy Xamarin Android + MQTTNet to hopefully a Flutter based implementation with native Kotlin service bindings. The App is designed to act as a short term server for embedded devices. Same strategy has worked with Xamarin Android + MQTTNet only the next version is planned to be implemented using Flutter.
Expected behavior
Server runs
Actual behavior
Problem areas are calls to
Optional
class. This feels like I just missed something very basic. Only the calls toOptional.xxx()
is causing the issue, as in the case below./io/moquette/broker/NewNettyAcceptor.class
Full Error
Steps to reproduce
ext.kotlin_version = '1.3.21'
flutter create -i swift -a kotlin
Running on Service that is on separate Android process. Btw, the permissions are also being asked during runtime. Also test writes/reads to filesystem were proven to be good.
Broker Creation
Minimal yet complete reproducer code (or URL to code) or complete log file
Can't produce this now as there is a lot of proprietary code. Working on a redacted code.
Moquette MQTT version
JVM version (e.g.
java -version
)OS version (e.g.
uname -a
)Android