How safe is to build an app for Android 1.5 devices while targeting Android 1.6 SDK?
I'm building an application, and need to support both 1.5 (Magic and Hero) and 1.6 (Tattoo) devices.
As Android SDK is forward compatible, it seemed logical to build against Android 1.5 SDK, and expect application to work on Tattoo.
While that's true, (I tested app, it works ok), I'm now having problems on Android Market.
On Tattoo, Market search by default filters android apps that doesn't have explicit support for small screens defined in AndroidManifest.
Problem is that attribute exists only on Android 1.6 SDK, so Building against Android 1.5 SDK is no an option anymore.
How safe is to build App agains A1.6 (with minSdkVersion="3"
) and run it on 1.5 devices?
Is there anything else I should take care of except just change target SDK?
Asked by: Roland434 | Posted: 20-01-2022
Answer 1
Make sure you don't mix up minimum SDK version and target SDK version as these are different options.
For example, I use the following setting in the application for my manifest:
<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4"/>
The documentation says the following about targetSdkVersion
:
In some cases, this allows the application to use manifest elements or behaviors defined in the target API Level, rather than being restricted to using only those defined for the minimum API Level.
So by specifying targetSdkVersion
of 4 but having a minimumSdkVersion
of 3 you'll have an application which should work on 1.5 devices and 1.6 small screen devices.
Similar questions
Targeting Android with Scala 2.8 Trunk builds
The definitive reference for using Scala on android seems to be here: http://www.scala-lang.org/node/160
Unfortunately, all the references on using scala with android are based around Scala 2.7 and refer to a custom build android-library.jar, with a couple of cryptic references suggesting that this custom build isn't needed for later version...
Targeting Android with Scala 2.8 Trunk builds
The definitive reference for using Scala on android seems to be here: http://www.scala-lang.org/node/160
Unfortunately, all the references on using scala with android are based around Scala 2.7 and refer to a custom build android-library.jar, with a couple of cryptic references suggesting that this custom build isn't needed for later version...
target - Targeting specific carriers in Android
I read here: http://www.androidguys.com/2009/10/11/developers-can-now-target-by-carrier-in-android-market/ that it can be done if you go to the Android Market, and go to your app, then go to Publishing Options -> Locations, but I don't see anything to select a specific carrier there, only specific coun...
in app purchase - Which in-app billing library should I use in app targeting both mobiles and tablets?
The Market's policy on in-app billing says:
If your device is running Android 3.0, in-app billing requires version
5.0.12 (or higher) of the MyApps application. If your device is
running any other version of Android, in-app billing requires version
2.3.4 (or higher) of the Android Market application.
I planned to use SDK 3.1 so that the app works both on mobile phones and ...
javascript - Targeting android mobile devices
Is this possible?
I want to exclude android phones from using some code, but I still want it to work on android tablets.
The only user agent I can find is "android" which will obviously exclude everything android related.
Targeting Android SDK 14 or greater causes my app to not display
When targeting Android SDK 12 my app displays perfectly fine on my Galaxy Nexus. The whole view is essentially a WebView. Here is the layout:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
android:id="@+id/mainLayo...
android - Why does a Dropbox account option show up when I launch the Add Account screen targeting my app
I want to launch the "Add an account" while targeting my app. This is done by putting EXTRA_AUTHORITIES into my intent. Here's the code (with the package name changed):
public static void launchAddAcountActivity(Context context) {
context.startActivity(new Intent(Settings.ACTION_ADD_ACCOUNT).putExtra(
Settings.EXTRA_AUTHORITIES,
new String[] {
"com.myproject.p...
android - Targeting correct viewport for mobile
I have the following in the header:
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
I've also tried using:
@media screen and (max-device-width: 320px) { .... @media screen and (min-width: 321px) {<-- works only on iphone.. android is not 320px.
but have had to modify it ...
android - AVD Targeting Multiple Platforms
I found a lot of online resources regarding targeting a variety of Android versions from my min-SDK version up through my target-SDK. This includes doing things like reflection or wrapper classes to test for the advanced functionality that may be available only in the higher Android version I'm targeting.
What I cannot figure out is how to get this to work in Eclipse. Specifically, the problem I am running into is ...
android - Targeting Google APIs
I'm new to Android Development and Eclipse and I'm going through the various tutorials.
When setting up Eclipse I installed Android 2.3.3 SDK Platform along with Google APIs for that platform.
When I create new projects for most all of the tutorial programs I select Android 2.3.3 as my target.
However, when going through the Google Map Views tutorial I am told to select Google APIs instead of Andr...
styles - Not targeting the latest versions of Android
I have a warning when trying to test theme on latest Android SDK Package 4.2.
Here is my manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.themetest"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersi...
Still can't find your answer? Check out these communities...
Android Google Support | Android Community | Android Community (Facebook) | Dev.io Android