4

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());
            // ...
        }

JuliaKo
  • 731
  • 1
  • 11
  • 19

1 Answers1

1

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.

cark
  • 254
  • 2
  • 9
  • just curious i got it with the changes in version things change or methods also change i want to know how to know what new methods we can use other then depreciated methods ?? just to ultilize functionality change with the time...i know we should use depreciated method to work with previous version compatibility issues ..but what in case i want my app to utilize new version functionality as well...... – PN10 Jan 15 '17 at 20:28
  • In this moment the official documentation doesn't explain how to replace this deprecated methods. Wear 2 should be released in February, I suppose that the documentation will be updated in few weeks. – cark Jan 16 '17 at 08:50
  • Well looking forward to.. Documentation.. Hope it answers..All questions..related to wear 2... – PN10 Jan 17 '17 at 06:57