Answer the question
In order to leave comments, you need to log in
If the code in the version is deprecated?
If the code is deprecated, then you just need to check the version through Build.VERSION.SDK_INT <= Build.VERSION_CODES.M
and execute all the code further in brackets, and if it is more than this version, then copy the whole code and paste it into the else block?
That is, 2 almost identical large pieces of code should turn out? For example, I have a database creation of 20 lines of code, 2 of them are deprecated, so in the first block of code I write 18 lines of code, and in the else I write all 20?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question