esptouch_flutter icon indicating copy to clipboard operation
esptouch_flutter copied to clipboard

The plugin `esptouch_flutter` uses a deprecated version of the Android embedding

Open purevnorov opened this issue 3 years ago • 9 comments

The plugin esptouch_flutter uses a deprecated version of the Android embedding. To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it since a future release of Flutter will remove these deprecated APIs. If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.

purevnorov avatar Sep 03 '21 10:09 purevnorov

I see this warning too. Any suggestions?

kiranvivo avatar Sep 24 '21 16:09 kiranvivo

Yes i am seeing this as well, maybe on the next update this can be upgraded to v2 embedding?

Polydevelopment1 avatar Sep 27 '21 07:09 Polydevelopment1

Thank you for letting us know. I'm not sure when we'll have time to do the migration (and the testing required to make sure everything is still running correctly). Community contributions would be welcome.

vincevargadev avatar Oct 06 '21 14:10 vincevargadev

any update plan?

aminjoharinia avatar Nov 30 '21 11:11 aminjoharinia

@aminjoharinia as @vincevargadev pointed out there is no plan yet to upgrade and test it. Having said that, contributions in the form of a PR are welcome.

max-koehler avatar Nov 30 '21 11:11 max-koehler

Hello Vince, I updated the plugin to the Android V2 embedding. So far I'm able to compile it, compile the example without the V2 warning and run on the Android emulator without errors/crashes - of course the emulator notifies 'no device' cause the WiFi is emulated. Tomorrow I will receive an ESP32 board and in the week-end I hope to check the app+plugin against a real board.

Regards

SteMMo33 avatar Mar 09 '22 16:03 SteMMo33

I published a pre-release version on pub.dev https://pub.dev/packages/esptouch_flutter/versions/1.1.0-androidv2

Please give it a try, and let us know if anything is not working as it did before.

If we don't receive any negative feedback, I'll release it as stable in a couple of weeks.

vincevargadev avatar Mar 27 '22 13:03 vincevargadev

Good news, thanks !! I updated the plugin with the 1.1.0-androidv2 version: so far I tested on Android 7.0 API 24 and it worked. I see some new debug messages on console and in the compilation time I see the following message:

Note: C:\Progetti\flutter\.pub-cache\hosted\pub.dartlang.org\esptouch_flutter-1.1.0-androidv2\android\src\main\java\com\smaho\eng\esptouch\EsptouchPlugin.java uses or overrides a deprecated API.

Soon I will test on iOS. Thanks a lot!

SteMMo33 avatar Mar 29 '22 10:03 SteMMo33

It works like a charm!

I tested on iOS (16.0.2) and Android (9), the warning message disappeared. Also, I got a debug message like @SteMMo33.

Thanks for the update!

nguyen703 avatar Oct 03 '22 03:10 nguyen703