How to restrict app to Android phones only

前端 未结 4 1958
抹茶落季
抹茶落季 2020-12-01 14:50

Hello I am targeting users to Android phones only. I want to restrict the app to install on Android phones ony not on phablets and tablets.

<
4条回答
  •  借酒劲吻你
    2020-12-01 14:59

    Quoting the documentation:

    Because the system generally scales applications to fit larger screens well, you shouldn't need to filter your application from larger screens. As long as you follow the Best Practices for Screen Independence, your application should work well on larger screens such as tablets. However, you might discover that your application can't scale up well or perhaps you've decided to publish two versions of your application for different screen configurations. In such a case, you can use the element to manage the distribution of your application based on combinations of screen size and density. External services such as Google Play use this information to apply filtering to your application, so that only devices that have a screen configuration with which you declare compatibility can download your application.

    Bear in mind that requires you to whitelist every screen size and density that you are supporting (and we get a new density every year or so), and you are limited to the classic screen size buckets (small, normal, large, xlarge). The documentation's sample is missing some densities:

    
        
        
        
        
        
        
        
        
        
        
    
    

    You will need to add additional elements if are willing to support tvdpi, xxhdpi, and xxxhdpi devices.

    Quoting the documentation for :

    Caution: Normally, you should not use this manifest element. Using this element can dramatically reduce the potential user base for your application, by not allowing users to install your application if they have a device with a screen configuration that you have not listed. You should use it only as a last resort, when the application absolutely does not work with specific screen configurations. Instead of using this element, you should follow the guide to Supporting Multiple Screens to provide scalable support for multiple screens using alternative layouts and bitmaps for different screen sizes and densities.

    And bear in mind that marketing terms like "phablet" is ill-defined, and so your app may wind up shipping on some devices that you happen to think is a phablet or that somebody else thinks is a phablet.

提交回复
热议问题