I have an application that works fine in Android 1.x, but not in Android 2.x. I need to do something different depending on the version of Android that the application is running on (contact requests). Is it possible to have two separate methods in one application that I can choose based on the version of Android on which the application is running?
many thanks
Ed
Use reflectors and class loaders. See this post on the Android developer blog: http://feedproxy.google.com/~r/blogspot/hsDu/~3/9WEwRp2NWlY/how-to-have-your-cupcake-and-eat-it-too.html
: CommonsWare , , : http://github.com/commonsguy/cw-advandroid/tree/master/Contacts/Spinners/
sdk BUILD.VERSION, Android sdk?
, , 1.x 2.x. - ?
, , .
. , SDK. , 1,6 ( , 1,5 )
: http://developer.android.com/reference/android/os/Build.VERSION.html
/: http://developer.android.com/guide/practices/screens_support.html
The example business card that comes with the latest Android SDK was a big, big help. I recommend it to those who, like me, may not be a full-time professional. Thank you all for your kind contribution.
Source: https://habr.com/ru/post/1782936/More articles:Android ADB API from C / C ++ Applications - c ++How to add line feed to header style tooltip in firefox? - html0.1 + 0.7% = 0.8 - floating-pointAndroid How do you support the old API without having 2 compiled .apk files when using methods from the newer APIs? - androidMy SQL captures the last active users in one week - mysqlProblems compiling FMOD - c ++Mobile web application platform in Java or PHP - javaCan I compile an Android application on 2.1 and have support for all versions 1.5? - androidAsp.net mobile phone support - cross-browserhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1782941/squid-url-rewrites-https-to-http&usg=ALkJrhjseuVOZ86nNMHoaSnkeTah-CD4yAAll Articles