Search code examples
androiddevicescreen-size

Prevent some devices from use my android app


I am developing an android app which a design that needs at least 3,5 inches. I know that this property "android:requiresSmallestWidthDp" exists but I can't use it because my app is avalaible from api level 8.

So... is there any way of prevent my app from being installed or downloaded if the devices hasn't got a screen with 3,5 inches?


Solution

  • I know that this property "android:requiresSmallestWidthDp" exists but I can't use it because my app is avalaible from api level 8.

    android:requiresSmallestWidthDp is not used. Quoting the documentation:

    Caution: The Android system does not pay attention to this attribute, so it does not affect how your application behaves at runtime. Instead, it is used to enable filtering for your application on services such as Google Play. However, Google Play currently does not support this attribute for filtering (on Android 3.2), so you should continue using the other size attributes if your application does not support small screens.

     

    So... is there any way of prevent my app from being installed or downloaded if the devices hasn't got a screen with 3,5 inches?

    No. You can use <compatible-screens> to limit yourself to small screens, which will be under 3 inches, but you will miss out on devices with screens from 3 to 3.5 inches.

    Also note that not that many devices have screen sizes that small.