add -Xlint:deprecation to android code example
Example: Xlint:deprecation android studio
//add to android project level build.gradle
allprojects {
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}