flutter_wear_plugin icon indicating copy to clipboard operation
flutter_wear_plugin copied to clipboard

Ambient Mode not working in release mode

Open gongbj0113 opened this issue 2 years ago • 2 comments

AmbientMode worked fine in debug mode, but when I build apk in release mode, it doesn't work.

The flutter should have rebuilt the screen right before it entered ambient mode, but it seemed that rebuild didn't occur. The screen just stopped when it entered ambient mode. (I'm using Samsung Galaxy Watch 5)

image

I tried to get the event log, but nothing was printed. (Other prints were received correctly.)

gongbj0113 avatar Sep 09 '22 16:09 gongbj0113

Same issue. Works 'fine' in debug (also works in profile, just checked), but nothing is happening in release.

AmbientMode(builder: (context, mode, child) {
        return mode == WearMode.ambient
            ? AmbientScreen(
                manager: manager,
              )
            : ActiveScreen(
                manager: manager,
                box: box,
              );
      }),

Edit: also using Galaxy Watch 5.

zbejas avatar Nov 03 '22 22:11 zbejas

Until that PR gets merged, just add the following to your app's proguard config

-keep class com.mjohnsullivan.flutterwear.wear.** { *; }

Rexios80 avatar Mar 16 '23 18:03 Rexios80

I released the wear_plus plugin which contains the necessary fixes

Rexios80 avatar Mar 20 '24 15:03 Rexios80

Thank you for your work. I appreciate it.

gongbj0113 avatar Mar 20 '24 16:03 gongbj0113