2
I’m new in android and I need to get the version of Android Device in a direct way, without having to consult, for example:
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB_MR1)
Has as?
2
I’m new in android and I need to get the version of Android Device in a direct way, without having to consult, for example:
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB_MR1)
Has as?
Browser other questions tagged android
You are not signed in. Login or sign up in order to post.
And why can’t you use
Build.VERSION.SDK_INT
?– Guilherme Nascimento
@Guilhermenascimento unless the AP, instead of the number, wants the name(HONEYCOMB_MR1)
– ramaral
Try Context.getApplicationInfo()
– Miguel
@ramaral yes I thought about it because if this is maybe a list would already solve, but I don’t know if he wants the code name or if he wants to create fallback codes for older versions.
– Guilherme Nascimento
I apologize to everyone. I was away for a while and I couldn’t get into this space. My problem is the following: I have a Samsung phone with the android version "Lolipop" 5.0.2. My wife also owns the same phone, however, purchased more recent and has the version "Lolipop" is 5.1.1. My App cannot read this version, since, using "Build.VERSION.SDK_INT", the most I can see is version 5.0.2 (M).
– Valdomiro