📜 ⬆️ ⬇️

Tim Bray, "Promising Your Android Application"

As a developer, I am very pleased with the potential of Android, as a single development platform that can make my applications available on a wide range of devices. From smartphones to televisions - Android is now used on a wide range of devices.

Last year’s release of the Android SDK 1.6 was the first to support various devices and paved the way for devices like the HTC Tatoo - with a small screen and a camera without autofocus. Future devices, such as Google TV, may not include the features we are expecting now, such as an accelerometer and telephony.

We all want our applications to be available on as many devices as possible. But on some devices they simply do not make sense, so it is important that applications are available only on those devices where they will work.

Android Market Rule number 1: Do not allow existing applications to abandon support for new devices


One of our most important duties as curators is to ensure that consumers and developers can use in the Market only those programs that will work on their device.
')
The Android SDK includes built-in capabilities for determining which hardware features your application needs, so we see many variations of programs in the Market for platforms with different hardware capabilities.

Specify the hardware needs of your application in the manifest.


This includes the target and minimum SDK version, supported screen resolutions, and the necessary hardware parts without which your application will not start.

<uses-feature android:name="android.hardware.microphone" />

By attaching to the update of your manifest all the hardware functions that you require, you actually refuse from future equipment that will not be able to support your application.

Android Market Rule number 2: Do not allow existing applications to abandon support for new devices


In the "extreme" conditions, such as the introduction of small screens in Android 1.6 - developers must clearly choose whether these applications will go to the market for new devices.

In other cases, the Android Market will analyze whether the functions requested by the application can be performed on the available hardware. For example, the CALL_PHONE function requires a telephone module for execution.

Until we have provided a more convenient tool - you can use AAPT in the SDK (from 2.2) to analyze your applications.

aapt dump badging myApp.apk

If your application uses special hardware, but you know (and proved with a test) that it will still work without it, you can specify it as optional by setting the necessary attribute to false.

<uses-feature android:name="android.hardware.telephony" android:required="false" />

Ensure that the manifest of your application correctly determines which hardware is required for your application, and which is optional.


With the functionally-used name of the string that appears ( note the use -feature name strings), you can now make sure that your application will appear in the Android Market and whether it will be supported on current and future devices, and not wait for them to exit.

It is in your interest as a developer to ensure that your application works well and is available on as many devices as possible and appropriate. Now is the time to test the performance of your applications, and update the Manifest to determine the hardware configurations that your applications support, and abandon those configurations on which it will not work.

Thanks for attention!

Source: https://habr.com/ru/post/98619/


All Articles