Publishing multiple versions of one app on Google

2019-05-07 12:59发布

问题:

I have an Android app that I would like to display high quality images with. However there are many different screen sizes and ratios. I know there are filters to show apps in Market only for devices with small/medium/large screens.

If I put images of both sizes in 1 app it will double the size of the app, right?

Is it a good practice to make multiple versions for different screen sizes?

I would like to make 1 app in 3 versions for such devices:

  • medium screen mdpi
  • medium screen hdpi + large screen mdpi
  • large (tablets)

If it's possible to do it how can I specify them in manifests? Or is it somewhere in market?

回答1:

No one seems to be addressing the file size issue you're really asking about, so I'll try.

You should package your high quality images as a set of separate downloads, one for each type of device you plan to support. This makes your base app small, and ensures the end user's disk space is only filled by images it needs.

I've not done this myself, but hopefully the idea will send you on the right search path. I imagine you design the separate download as either resources on your own server, or another set of apps in the market (i.e. "MyApp Image Pack HDPI", "... MDPI", etc.).



回答2:

Android has a built-in mechanism for having resources designed for different screen sizes and pixel densities. It's called resource directory qualifiers, and you can read all about it here.

For example, for small screen sizes, you could create a specific layout file and place it in the res/layout-small directory. For a larger screen, you could create a layout file with the same name and place it in the res/layout-large (or res/layout-xlarge) directory.

For pixel density, you could create a small version of your image resources and place them in the res/drawable-ldpi directory (lower pixel densities). And for higher pixel densities, you could create alternate versions and place them in the res/drawable-hdpi directory.

I'd encourage you to read the page on Supporting Multiple Screens, and let Android help you out with its built-in mechanisms. Creating three separate copies of your app is harder for you to maintain, and it confuses potential users (most of whom probably neither know nor care about "pixel densities"). What's to stop them from downloading the wrong version of your app, and getting a lousy experience because of it?



回答3:

As Donut mentions above android has excellent documentation for this here, here, here and here.

Note that all Manifest file changes and how to create one binary that will support different screen sizes, different densities AND different SDK's are at android website. But it requires careful planning and testing to do so.

The best way is to have ALL device configurations (listed here, including the Samsung Galaxy Tab simulater (large screen, hdpi) available here) in your development environment and test your app on them.



回答4:

You have to create different .apk for each version and define this in your application's manifest file.use this link http://developer.android.com/guide/practices/screens-distribution.html