Annyce Davis

Davis Technology Consulting

  • Home
  • About Me
  • Blog
  • Courses
  • Newsletter

How to fix common Android API deprecations

August 19, 2022 by Annyce Davis

Each year there’s a new version of the Android SDK released. Along with the myriad of new features come deprecations. When something is deprecated, although it’s still available, it’s best to migrate to the recommended new API. With that being said here are some common deprecations I encountered in my company’s Android codebase and how to fix them.

Deprecated Menu APIs on Fragments

The Fragment APIs for providing a menu to your activity’s ActionBar have been deprecated as they tightly couple your fragment to your activity and are not testable in isolation. The new MenuHost and MenuProvider APIs provide a testable, lifecycle-aware equivalent API surface that fragments should use instead.

Continue Reading

Follow Me

  • Bluesky

Categories

  • Android (60)
  • Career (5)
  • Communication (4)
  • Flutter (1)
  • Git (4)
  • Gradle (4)
  • Grails (23)
  • iOS (1)
  • Java (8)
  • JavaScript (6)
  • Kotlin (17)
  • Life (5)
  • Public Speaking (26)
  • Revenue (2)
  • RxJava (1)
  • Software Development (13)
  • Twitter (3)
  • Uncategorized (11)
  • Video Course (5)

Follow Me

  • Bluesky

Copyright © 2025 · All Rights Reserved · Log in

 

Loading Comments...