1

I am developing a flutter app for android (flutter version 3.3.9, compileSdkVersion = 33) and I see this in the console a lot:

    D/InputMethodManager(20966): showSoftInput() view=io.flutter.embedding.android.FlutterView{55ec592 VFE...... .F....ID 0,0-1080,2337 #2 aid=1073741824} flags=0 reason=SHOW_SOFT_INPUT
    W/OnBackInvokedCallback(20966): OnBackInvokedCallback is not enabled for the application.
    W/OnBackInvokedCallback(20966): Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
    D/InsetsController(20966): show(ime(), fromIme=true)
    D/InputMethodManager(20966): showSoftInput() view=io.flutter.embedding.android.FlutterView{55ec592 VFE...... .F...... 0,0-1080,2337 #2 aid=1073741824} flags=0 reason=SHOW_SOFT_INPUT
    D/InsetsController(20966): show(ime(), fromIme=true)
    D/InputMethodManager(20966): showSoftInput() view=io.flutter.embedding.android.FlutterView{55ec592 VFE...... .F...... 0,0-1080,2337 #2 aid=1073741824} flags=0 reason=SHOW_SOFT_INPUT
    D/InsetsController(20966): show(ime(), fromIme=true)

Should I really set enableOnBackInvokedCallback to true? In this SO question, the answer explains why this happens.

But since I don't develop in native android but in flutter, is it the same for me? Should I even care about this?

(Usually I let flutter manage all the native stuff and most of the time it's best not to change anything)

Finni
  • 429
  • 5
  • 17

1 Answers1

1

I had set android:enableOnBackInvokedCallback="true" in AndroidManifest.xml in my Flutter app, but this seems to break the router back navigation (I tried with both go_router and auto_route and got the same issue).

Only the AppBar back button worked, but the device's own back button at the bottom of the screen just exited the app without stepping back through the pushed routes.

paulrenn
  • 13
  • 5