Closed komputerboy closed 4 years ago
@komputerboy Are you sure that it's the Kotlin vs Java that's causing the issue? It should not matter and I just created an example app using Kotlin as the Android language that successfully runs ESP Touch tasks: https://github.com/smaho-engineering/esptouch_flutter_kotlin_example
I created the Flutter app with the following command (FYI: --android-language
defaults to Kotlin, so the only reason I added it is to be explicit).
flutter create --android-language kotlin .
You can see in commit https://github.com/smaho-engineering/esptouch_flutter_kotlin_example/commit/f97ca3a1ad7f0be40a2cc03e811944b04682378c the changes you need to make to your project to get a very basic example working.
Please keep in mind that the esptouch_flutter
package is a Flutter package and you should be interfacing with it using the Dart programming language. If you find that you want to call esptouch related commands from your Kotlin files, you should consider using the original ESP module that you can find here: https://github.com/EspressifApp/EsptouchForAndroid
I'm closing this issue now, but if you still have issues with the esptouch_flutter
package, please feel free to open a new issue with a new description.
I try to run your example and it perfectly works. But when i try to implement to my own apps it is not working.
The problem is i am using kotlin file, but in your project is using java file. So please add example using MainActivity.kt (kotlin file)
Thanks