Sell Apps with sdk target 13? - android

I would like to know if phones with Android 2.3 or lower could download Apps with:
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="15"/>
and Build Target 15?
Becuase I have to do so to use the AdMob jar.
Thanks

Yes they can, this is the goal of the android:minSdkVersion attribute. It prevents users with an older android version to download and install the app.

Yes, any device running SDK version 7 and above will be able to install your application. The targetSdkVersion attribute doesn't restrict devices from installing your application. Instead, it specifies the maximum API level on which your application should be able to run on.
Just be careful that you protect earlier versions of Android from making use of the new methods provided in SDK 15, as this will cause your application to crash.

Related

Android App doesn't launch on lower version than targetSDKVersion

I have just downloaded the latest SDK version from Android SDK Manager and set my App's Project Build Target to Google APIs level 17 as below
And added in my App's AndroidManifest.xml as below
<uses-sdk
android:minSdkVersion="3"
android:targetSdkVersion="17"
android:maxSdkVersion="17" />
And loaded the Emulator with Level 8, 2.2 then tried to launch the App on this Emulator. Whenever I run the app it says "No compatible targets were found" (I know I can create AVD for level 17 but want to launch on emulator level 8) when I have android:minSdkVersion="3" in my AndroidManifest.xml.
I researched a lot and did not find a proper answer to this.
Then I changed the Project Build Target to Android 4.2 level 17 as below
The App started launching on all the Emulators below level 17.
But I still don't know what is restricting the App to launch on lower version Emulator when the Project Build Target is to Google APIs level 17
Google APIs Add-On is an extension to the Android SDK development environment that lets you develop applications for devices that include Google's set of custom applications, libraries, and services. A central feature of the add-on is the Maps external library, which lets you add powerful mapping capabilities to your Android application.
Enabling Google APIs lets you use features that are not present in default Android devices. Since your minSdkVersion is set to 3, you should be able to launch the application if you create an emulator with API version greater than 3 but with Google APIs enabled.
Just remove the targetSDKVersion attribute and then try.
An integer designating the API Level that the application is targetting.
With this attribute set, the application says that it is able to run on older versions (down to minSdkVersion), but was explicitly tested to work with the version specified here. Specifying this target version allows the platform to disable compatibility settings that are not required for the target version (which may otherwise be turned on in order to maintain forward-compatibility) or enable newer features that are not available to older applications. This does not mean that you can program different features for different versions of the platform—it simply informs the platform that you have tested against the target version and the platform should not perform any extra work to maintain forward-compatibility with the target version.
https://stackoverflow.com/a/4568358/760489
try removing android:maxSdkVersion

How to work on latest sdk and support older ones

I need to suppoert api level 10, and working with latest sdk to provide new device features (only if sdk of device is new).
on manifest I choose min version 10.
The problem is that the application is not installed succesfully on the old sdk devices.
Whne I debug on those devices it works, The installation of signed aok fails.
Any suggestions?
Use this in your manifest file
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
If your application uses any API's that are not available on older Android versions, then you should try to use Support Libraries or just give up on those devices. If the application does run on older emulators in debug mode, then you can just change the minSdkVersion in the manifest to a lower one. Hope this helps.

Relation between android:minSdkVersion, android:targetSdkVersion and "target"

So, I'm a little confused, I thought I understood the meaning of android:minSdkVersion, android:targetSdkVersion and target in project properties.
Right now I got these set to:
android:minSdkVersion="7"
android:targetSdkVersion="13"
And:
target=android-15
in project->properties->Android->Project Build Target.
When I try to run this application application on a device with Android 2.3.3 installed, I see a red cross against the device name but the application runs fine on it none the less.
What am I missing? If I'm building against 15, how is it running on android-7? This confusion stated after I integrated AdMob into my app which states it require minimum SDK level 13.
To describe one at a time:
android:minSdkVersion helps Google Play filter apps for the user based on their device. For instance, with minSdkVersion="7", someone browsing with a device that only supports 6 won't see your app on Google Play, and thus won't download it, find it doesn't work, and leave a bad review :)
android:targetSdkVersion is a signal to the device about which version of the API your app was tested against. New behaviors are often available by default with new versions of the platform, for applications that target at least that version of the platform. For instance, by setting your targetSdkVersion to 11 or higher, you get an overflow menu in the ActionBar (for Honeycomb and up devices) instead of the "legacy menu button of shame".
project.properties target is a signal to your local build system regarding which version of the platform you should be compiling your code against. Generally it's best to just set this to whatever you have set for the targetSdkVersion.
What am I missing? If I'm building against 15, how is it running on
android-7?
Android maintains backwards compatibility for just this reason. When you use API's that were added in version 15 of the platform, obviously they won't be there on a device running an an older device.
However, it's possible (and encouraged) to design your application in such a way as to take advantage of features added on new platforms, but "degrade gracefully" such that your application continues to run on older ones. There's an Android Training lesson on just this topic, called Supporting Different Platform Versions.
android:targetSdkVersion="13" Indicates that this application has been build by keeping the sdk 13 as target, to use its feature to full potential
android:minSdkVersion="7" indicates that it works on sdk 7 and above, but some of its features can be stripped down if certain features are not available in lower sdk. ie(less than sdk 13)
android:minSdkVersion="7" means you can't run this app in devices under 2.1(API-7). android:targetSdkVersion="13" the app is built targetting this API. the build target will be set to 13 and the methods and stuffs that are available till 13 will work.
http://developer.android.com/guide/topics/manifest/uses-sdk-element.html

android app to be runned only in 2.2 and 2.1 versions

in my app i have two set of designs. One design is for the android devices version of 2.1 and 2.2, the other design is for devices of 2.3 and above.
Now the problem is i take a build setting as follows in my manifest file
<uses-sdk android:minSdkVersion="7" />
<uses-sdk android:maxSdkVersion="8" />
My android project properties in been set to 2.2. When i run this build in 2.3.4 devices it gets run properly. How does it happens?
I am planning to submit the app with multiple apk files in market. How to block my apps
one build to be run in 2.1 and 2.2 and
the other build to get run in 2.3 and above
I just tried setting only <uses-sdk android:minSdkVersion="7" /> or <uses-sdk android:maxSdkVersion="7" /> or <uses-sdk android:maxSdkVersion="8" /> or
<uses-sdk android:targetSdkVersion="8" /> then also it gets run in all devices of 2.3.4 devices
Please help me friends....
Hey as per the android documentation :
Introduced in: API Level 4
Future versions of Android (beyond Android 2.0.1) will no longer check or enforce the maxSdkVersion attribute during installation or re-validation. Google Play will continue to use the attribute as a filter, however, when presenting users with applications available for download.
You might want to have a look at last few lines of this link
EDIT1:
Also have a look at the Warning
Warning: Declaring this attribute is not recommended. First, there is no need to set the attribute as means of blocking deployment of your application onto new versions of the Android platform as they are released. By design, new versions of the platform are fully backward-compatible. Your application should work properly on new versions, provided it uses only standard APIs and follows development best practices. Second, note that in some cases, declaring the attribute can result in your application being removed from users' devices after a system update to a higher API Level. Most devices on which your application is likely to be installed will receive periodic system updates over the air, so you should consider their effect on your application before setting this attribute.
According to documentation:
Future versions of Android (beyond Android 2.0.1) will no longer check or enforce the maxSdkVersion attribute during installation or re-validation
http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#max
Alternatively, you can check API version at runtime and block the use of your app.
http://developer.android.com/reference/android/os/Build.VERSION.html
You can install it using the adb or directly downloading the apk through a website.
The minSdk and maxSdkVersion is checked only when its installed from Android market. Devices with versions out of this range will not see your app in the market.
You need to use PackageManager Class for Version Specific Application. There is a method called getPackageInfo() which returns an object of PackageInfo. From this PackageInfo, you can fetch values of Version Name & Code.
Now you have values, so use logic and implement it

What happens if we use/install 2.3 build in 2.2 device

I am working on application which should go into android 2.2(Froyo) and android 2.3(GingerBread) devices.
I have built application with android 2.3 SDK , and Installed the same application in 2.2(Froyo) and 2.3 (Ginger Bread) devices.
In both the devices application installed successfully and it is working properly.
I want to know if we install the higher version build into lower version devices is there any chances to face problems.
Till now I didn't found any issue with this.
I didn't used the MIN:SDK version field in the Manifest file.
If you want only users from version 2.2 and up to download your app, just make sure your minimum SDK version is 2.2 by putting this line in your AndroidManifest.xml:
<uses-sdk android:minSdkVersion="8" />
If you want an upper bound limit as well, you can add:
android:maxSdkVersion="10"
So users with Android SDK version 2.2 up to 2.3.3 will be able to install your app.
Regarding problems: If you're using a specific SDK API then just make sure to add an if clause around it to make sure you're on the right version. The best thing to do is change the target to 2.2 just to see if you have any compilation errors... Then you'd know what to change.
Then just fix the problems, change back to 2.3 and build.
If you don't specify the minimum sdk attribute in the manifest file users with 2.2 won't see your application on the market. It specifies that your application supports 2.2 so that users can see the app on the market.
Make sure any functionality that you use from 2.3 has an alternative functionality so that 2.2 users have the ability to actually use your application.
yes , u can find problem ,
try to install that app on android 1.6
it's about API version , there will be some APIs in your app doesn't supported in a lower API version

Categories

Resources