Search code examples
javaandroidandroid-manifesttablet

Android Manifest file customization


How to customize an Android manifest file to have the following features?

  1. LDPI devices must be excluded.
  2. Camera with low resolution (320X240) must be excluded.
  3. Tablet devices must be excluded.

Solution

  • For compatible-screens write this code in your manifest:

        <compatible-screens>
    <screen android:screenDensity="mdpi" android:screenSize="large"/>
    <screen android:screenDensity="mdpi" android:screenSize="xlarge"/>
    <screen android:screenDensity="hdpi" android:screenSize="small"/>
    <screen android:screenDensity="hdpi" android:screenSize="normal"/>
    <screen android:screenDensity="hdpi" android:screenSize="large"/>
    <screen android:screenDensity="hdpi" android:screenSize="xlarge"/>
    </compatible-screens>
    

    This will only support mdpi and hdpi phones.