android developer tiny share-20160713

来源:互联网 发布:linux网络重启 编辑:程序博客网 时间:2024/04/29 06:31

今天把android compatibility的最后一个方案“Screen Configuration”讲完,结束关于compatibility这个话题。另外,讲下出于商业、法律的目的,如何限制你的app的功能,以便做到compatibility。

android按照屏幕大小(物理大小,像素)和屏幕密度这两个特性,把android众多手机归为每个特性对应的若干个分组里。如按照屏幕大小,分为small, normal, large, and xlarge,按照屏幕密度,分为mdpi (medium), hdpi (hdpi), xhdpi (extra high), xxhdpi (extra-extra high)等。归为对应的组里,以便做到趋于更好的适配。官方说明如下:

Android runs on devices of various sizes, from phones to tablets and TVs. In order to categorize devices by their screen type, Android defines two characteristics for each device: screen size (the physical size of the screen) and screen density (the physical density of the pixels on the screen, known as DPI). To simplify the different configurations, Android generalizes these variants into groups that make them easier to target:

Four generalized sizes: small, normal, large, and xlarge.
And several generalized densities: mdpi (medium), hdpi (hdpi), xhdpi (extra high), xxhdpi (extra-extra high), and others.
By default, your app is compatible with all screen sizes and densities, because the system makes the appropriate adjustments to your UI layout and image resources as necessary for each screen. However, you should optimize the user experience for each screen configuration by adding specialized layouts for different screen sizes and optimized bitmap images for common screen densities.
For information about how to create alternative resources for different screens and how to restrict your app to certain screen sizes when necessary, readSupporting Different Screens.

上面讲的都是从软硬件的角度,来说明compatibility的实现。下面讲下在Google Pay Store后台,如何配置一些选项,来达到官方说说的“Controlling Your App's Availability for Business Reasons”,具体如下:

In addition to restricting your app's availability based on device characteristics, it’s possible you may need to restrict your app’s availability for business or legal reasons. For instance, an app that displays train schedules for the London Underground is unlikely to be useful to users outside the United Kingdom. For this type of situation, Google Play Store provides filtering options in the developer console that allow you to control your app’s availability for non-technical reasons such as the user's locale or wireless carrier.
Filtering for technical compatibility (such as required hardware components) is always based on information contained within your APK file. But filtering for non-technical reasons (such as geographic locale) is always handled in the Google Play developer console.

0 0
原创粉丝点击