android-api-levels
Choosing the right API Level for my android application
You can find a breakdown of the different versions of Android in use here. Currently, if you target 2.1 (API 7) you’ll only miss out on about 3% of the market. Targeting 2.2 will miss just under 20%, or a fifth of the market. As for converting your app, you can check what API level … Read more
Pick up the Android version in the browser by Javascript
function getAndroidVersion(ua) { ua = (ua || navigator.userAgent).toLowerCase(); var match = ua.match(/android\s([0-9\.]*)/i); return match ? match[1] : undefined; }; getAndroidVersion(); //”4.2.1″ parseInt(getAndroidVersion(), 10); //4 parseFloat(getAndroidVersion()); //4.2
List of Android permissions normal permissions and dangerous permissions in API 23? [duplicate]
As of API level 23, the following permissions are classified as PROTECTION_NORMAL: ACCESS_LOCATION_EXTRA_COMMANDS ACCESS_NETWORK_STATE ACCESS_NOTIFICATION_POLICY ACCESS_WIFI_STATE BLUETOOTH BLUETOOTH_ADMIN BROADCAST_STICKY CHANGE_NETWORK_STATE CHANGE_WIFI_MULTICAST_STATE CHANGE_WIFI_STATE DISABLE_KEYGUARD EXPAND_STATUS_BAR GET_PACKAGE_SIZE INSTALL_SHORTCUT INTERNET KILL_BACKGROUND_PROCESSES MODIFY_AUDIO_SETTINGS NFC READ_SYNC_SETTINGS READ_SYNC_STATS RECEIVE_BOOT_COMPLETED REORDER_TASKS REQUEST_IGNORE_BATTERY_OPTIMIZATIONS REQUEST_INSTALL_PACKAGES SET_ALARM SET_TIME_ZONE SET_WALLPAPER SET_WALLPAPER_HINTS TRANSMIT_IR UNINSTALL_SHORTCUT USE_FINGERPRINT VIBRATE WAKE_LOCK WRITE_SYNC_SETTINGS and Dangerous permissions : READ_CALENDAR WRITE_CALENDAR CAMERA READ_CONTACTS WRITE_CONTACTS … Read more
Sources for Android API 23 Platform not found (Android Studio 2.0)
Apparently this issue has been fixed in Android Studio 2.1. Rerun the Android SDK Manager setup in Android Studio and this should solve your issue. In Android Studio: Windows: File -> Settings (ctrl+alt+s) -> Appearance & Behavior -> System Settings -> Android SDK. Mac: Android Studio -> Preferences (cmd + ,) -> Appearance & Behavior … Read more
Environment.getExternalStorageDirectory() deprecated in API level 29 java
Use getExternalFilesDir(), getExternalCacheDir(), or getExternalMediaDirs() (methods on Context) instead of Environment.getExternalStorageDirectory(). Or, modify mPhotoEditor to be able to work with a Uri, then: Use ACTION_CREATE_DOCUMENT to get a Uri to a location of the user’s choosing, or Use MediaStore, ContentResolver, and insert() to get a Uri for a particular type of media (e.g., an image) … Read more
Get Android API level of phone currently running my application [duplicate]
Check android.os.Build.VERSION, which is a static class that holds various pieces of information about the Android OS a system is running. If you care about all versions possible (back to original Android version), as in minSdkVersion is set to anything less than 4, then you will have to use android.os.Build.VERSION.SDK, which is a String that … Read more
Changing API level Android Studio
When you want to update your minSdkVersion in an existent Andriod project… Update build.gradle (Module: YourProject) under Gradle Script and make sure that it is NOT build.gradle (Project: YourProject.app). An example of build.gradle: apply plugin: ‘com.android.application’ android { compileSdkVersion 28 buildToolsVersion “28.0.2” defaultConfig { applicationId “com.stackoverflow.answer” minSdkVersion 21 targetSdkVersion 28 versionCode 1 versionName “1.0” } … Read more
Retrieving Android API version programmatically
As described in the Android documentation, the SDK level (integer) the phone is running is available in: android.os.Build.VERSION.SDK_INT The class corresponding to this int is in the android.os.Build.VERSION_CODES class. Code example: if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP){ // Do something for lollipop and above versions } else{ // do something for phones running an SDK before lollipop … Read more