android - startActivityForResult is deprecated, How to use registerForActivityResult in Flutter Plugin - Stack Overflow

I am the author of a Flutter Plugin that currenlty uses the startActivityForResult.Since it was deprec

I am the author of a Flutter Plugin that currenlty uses the startActivityForResult.

Since it was deprecated, and Google highly recommends the new StartActivityForResult API I would like to switch to the new registerForActivityResult.

However, the current approach requires changing FlutterActivity to FlutterFragmentActivity

This is fine for personal projects, but since I am developing a published plugin, does this mean that I should add in the installation documentation of my plugin that this step needs to be done ?

This would be a breaking change since the plugin used to worked without needing any change one the Android file, with the current deprecated API.

Is there a way to make it work without requiring the developer to make any manual change to their Android Kotlin file ?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745591742a4634875.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信