Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deprecated methods in watch face module

I'm developing a watch face on Android.

In onCreate method when I set watch face style, I see that a bunch of methods are deprecated, but on Android official website they are not. What should I do to get rid of these deprecated methods, or leave them as they are?



    @Override
        public void onCreate(SurfaceHolder holder) {
            super.onCreate(holder);

            setWatchFaceStyle(new WatchFaceStyle.Builder(DigitalWatchFace.this)
                    .setCardPeekMode(WatchFaceStyle.PEEK_MODE_VARIABLE)
                    .setBackgroundVisibility(WatchFaceStyle.BACKGROUND_VISIBILITY_INTERRUPTIVE)
                    .setShowSystemUiTime(false)
                    .setAcceptsTapEvents(true)
                    .build());
            // ...
        }

like image 871
JuliaKo Avatar asked May 02 '26 01:05

JuliaKo


1 Answers

Those methods are deprecated because of this changes in android wear 2. The notifications will be shown for few seconds and then the watch face will be visible again. For this reason those methods don't have sense anymore.

like image 166
cark Avatar answered May 04 '26 14:05

cark



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!