How to make my app work in all devices? - android

i made android app for minSdkVersion 23 and targetSdkVersion 23.while launching i saw that this can only support 5000 devices in 15000 devices.i want to make this app support for all devices.how can i do?
defaultConfig {
applicationId "com.love.ksr_red_app"
minSdkVersion 23
targetSdkVersion 23
versionCode 2
versionName "2.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

It depends on minSdkVersion and targetSdkVersion.
Try making minSdkVersion to lowest OS version to which you make your app compatible with.
And make targetSdkVersion to the latest OS version available. This will make sure that your application is targeting towards all the devices available in the market and will compatible with them.

i want to make this app support for all devices.how can i do?
Well..., That looks practically impossible. Though you can try below thing... which will make your app support most of the devices that are present in the market
1) Launch android studio and Create new project
2) Name new project
3) select the minimum support version user friendly
Look it will be supporting 96 % of the devices in the market
Things to keep in mind :
Very old devices are no more there in market like android 1.0 to 4.0
By doing this way it ensures you are going to give support to the maximum number of the devices you can
It will make and alter the things necessary for you in the project
Most importantly... you have to manage exceptions and build versions via code..!!
There are some devices like VIVO in india or other countries which takes android and modifies it to FuntouchOS which will not let you start your program ON_BOOT_COMPLETED... Such phones are based on android and not purely android like others.
Thats why it is not practically possible to support all the devices which shows you in Google console in numbers; while uploading an app
Hope it helps you or someone else

Change your buile.gradle with this configration.
**android {
compileSdkVersion 25
defaultConfig {
applicationId "com.websinfotech.apptophonecallexample"
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
}**

Related

versionName of re-uploading app after previous version was rejected

Our app had been rejected because of All File Access Permission and now we modified app compliant with google policy. We are going to upload updated version. Our app version 5.0.1 was rejected and versionCode was 51. But now I want to keep same version 5.0.1 and increase versionCode by one i.e. 52. Can I still use same versionName and increase versionCode by 1?
Yes. As #DarShan said, versionName in your build.gradle is just a label, you can arbitrarily name it. Such a restriction you mind is for versionCode. The versionCode you must set it larger number than the previous version.
defaultConfig {
minSdk 31
targetSdk 31
versionCode 1 // integer value
versionName 'Version.2021-10-28' // just a String value
}

The application I installed on Google Play does not work on android 5 version and android 6 version. What would be the reason?

The application I installed on Google Play does not work on android 5 version and android 6 version. What would be the reason ?"The application is closed." error is displayed on the screen. Application Google Play Store Link : link
Gradle Code:
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.frtparlak.EnglishWordTest"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
( A guess since no stacktrace is attached )
While you define 'minSDKVersion 16' you are still allowed to use code in your application incompatible with e.G. sdk 16.
Your compiler warns you but if you ignore these warnings and dont handle them your app will crash on some devices.
To fix it you can use the linter or just review your warnings and or your crash report.

How does gradle lint errors depend on the minSdkVersion?

I'm currently developing on an app using:
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
...
defaultConfig {
...
minSdkVersion 19 // to be 16
targetSdkVersion 19 // to be 25
...
}
}
As you can see my min/max APIs are both 19, but my intention is to build for 16 to 25. (The app has already been developed and used in this range.) At API 19, I get ~200 lint warnings/errors, some for various forms of deprecation. So my question is:
Would fixing all lint errors under API 19 cause app incompatibility problems when changing the API to range from 16 to 25?
PS. No I can't test because I simply have no access to devices of earlier/later AOS's. Or did I miss something?

APKs supporting Android Wear must have a minimum SDK version of at least 23

I received this error while uploading my APK to GooglePlay:
"APKs supporting Android Wear must have a minimum SDK version of at least 23, this APK has 20."
Both my mobile app and wear app have their minimum SDKs set to 20.
I've never had any problems updating my app previously, this appears to be a new restriction.
Is it a valid error? I thought the minimum SDK for Wear is 20 [Android 4.4W / Kitkat]
I tried un-ticking: "Pricing & Distribution: Distribute your app on Android Wear [ ]", but the error still occurs.
The problem is that I have folks using SDKs 21 & 22 as well. Also, while it is a dedicated Wear app, it has some utility as a standalone mobile app as well.
Any advice?
Apparently these rejections are due to changes Google made in preparation for Android Wear 2.0 standalone apps. Sometimes this restriction is inadvertently blocking phone apps that contain Android Wear 1.0 apps due to a manifest entry.
If you have a uses-feature manifest entry in your host/phone app for android.hardware.type.watch, remove it and you should be able to upload and get past the validation. Complete manifest entry below:
<uses-feature
android:name="android.hardware.type.watch"
android:required="false />
I have same problem and I couldn't find different solution to upload Multiple APK. This solution is not best(there is no wear support 23-) but no way to upload APK.
First I seperate AndroidManifest.xml 23- between 23+ cause of
<uses-feature
android:name="android.hardware.type.watch"
android:required="false"/>
App gradle:
productFlavors {
demoVer {
versionName = android.defaultConfig.versionName + "-TEST"
}
prodVer {
signingConfig signingConfigs.config
minSdkVersion 17
maxSdkVersion 22
versionCode 74
}
prodVerMin23 {
signingConfig signingConfigs.config
minSdkVersion 23
versionCode 75
}
}
dependencies {wearApp project(path: ':wearapp', configuration: 'prodVerMin23Release')}
Wear gradle:
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
minSdkVersion 20
targetSdkVersion 23
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
prodVerMin23 {
minSdkVersion 20
}
}
I ran into the same problem and found that you have to upload Multiple APKs to Google Play.
One APK which supports API level 23 and up (included wear 23 and up) and another one which supports API level 20 to 22 (included wear 20 to 22).
More info:
https://developer.android.com/google/play/publishing/multiple-apks.html
P.S.: Sorry for my English.

Update project to Android M compatible

I know this might be a easy question to some people, but i been googling this for this entire afternoon and try to find out how to set up the build.gradle file in my Android project.
I am updating some APIs and making them ready to Android M. Now everything is fine now. However, i got confused about the minSdkversion,targetSdkversion,complieSdkVersion.
My current setup is
android {
compileSdkVersion 'android-MNC' //this was 21
buildToolsVersion "22.0.1"
defaultConfig {
...
minSdkVersion 11
targetSdkVersion 'MNC' //this was 21
...
}
...
}
As you can see from the comments, my app was complied and target API21 before and now i change it to MNC in order to cover the whole range from api11to MNC.
This is my test cases,
Device with Android M(API22)---OK
Device with Android 5.1.1 (API22)---error and FAILED_OLDER_SDK
If i change my setup to
android {
compileSdkVersion 21
buildToolsVersion "22.0.1"
defaultConfig {
...
minSdkVersion 11
targetSdkVersion 21
...
}
Test cases,
Device with Android M(API22)---OK
Device with Android 5.1.1(API22)---OK
Device with Android 4.3.1(API18)---OK //Why is this OK?
if device with API18 can run the project complied against 21, then why the Android 5.1.1(API22) couldn't run the project complied against MNC?
Right now, since Android M is still in developer preview, any app that targets MNC will only run in emulators or devices with the MNC developer preview.

Categories

Resources