I am using MapsForge and everything is ok. My problem is that old android devices are not supportiing Bidi (bidirectional) text. Persian names of street in older devices are incorrect but in new android versions are ok. I want to detect the android version of device to decide to run my custom (and simple) Bidi or not. Any idea?
Asked
Active
Viewed 388 times
0
-
1I think the answer of this question will help you. http://stackoverflow.com/questions/3093365/android-get-version-of-system – mbauer Sep 20 '12 at 11:25
2 Answers
2
android.os.Build.VERSION.SDK
Build.VERSION.RELEASE
//give you the actual numbers of your version; 2.3.3 or 2.2

Nermeen
- 15,883
- 5
- 59
- 72
2
The String Build.VERSION.RELEASE
will give you the user-visible version string (i.e 1.5, 1.6, 2.0), while Build.VERSION.SDK_INT
will give you a value from Build.VERSION_CODES that would be better to use if you want to compare against it programatically.
StringBuffer buf = new StringBuffer();
buf.append("VERSION.RELEASE {"+Build.VERSION.RELEASE+"}");
buf.append("\\nVERSION.INCREMENTAL {"+Build.VERSION.INCREMENTAL+"}");
buf.append("\\nVERSION.SDK {"+Build.VERSION.SDK+"}");
buf.append("\\nBOARD {"+Build.BOARD+"}");
buf.append("\\nBRAND {"+Build.BRAND+"}");
buf.append("\\nDEVICE {"+Build.DEVICE+"}");
buf.append("\\nFINGERPRINT {"+Build.FINGERPRINT+"}");
buf.append("\\nHOST {"+Build.HOST+"}");
buf.append("\\nID {"+Build.ID+"}");
Log.d("build",buf.toString());

Chirag
- 56,621
- 29
- 151
- 198