Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
578 views
in Technique[技术] by (71.8m points)

android - What should be the largestWidthLimitDp for Phone only app (Do not support Tablet)

I want to support my Android app on for Phones and not for tablets. As per the guidelines I have used supports-screens tag as per below. The problem is the app is not listed in Play Store for some phone devices like Mi 4i, Mi Note etc. I think the problem is with the largetWidthLimitDp value, or is it something else?

<supports-screens android:smallScreens="true"
    android:normalScreens="true"
    android:largeScreens="true"
    android:xlargeScreens="false"
    android:largestWidthLimitDp="600" />

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Android isn't just phones and tablets.

You should consider why you really want to exclude Tablet support. This is completely your business decision to make, but goes completely against the Android philosophy. There is no clear definition of "phone" or "tablet". What about "phablets"? What about Android TVs? What about Chromebooks? What about Phones docked to computer monitors? What about new devices we haven't even thought about yet?

A helpful way to think about this is "What is it about tablets that means we don't want to target them?"

  • if it is the fact they normally don't make phone calls, then require uses-feature android.hardware.telephony and accept the fact you'll allow tablets that can make phone calls. This will be OK because your business decision is based on the ability to make phone calls.
  • If it is the fact they have large screens, then use screen size as targeting. Ruling out phones with large screens will be ok, because the business reason is large screens.

But saying "we don't want to target tablets" without a good technical reason for what it is about tablets you don't want to support is probably a mistake, as there is no technical definition of "tablet" and there are 1000s of weird and wonderful Android devices out there you probably haven't thought about.

In regard to your specific question android:largestWidthLimitDp isn't anything to do with what is supported. Instead it forces compatibility mode. See the documentation. In the right hand side menu of the Play Console there is an entry "Device catalogue". This will let you search for different devices and if they don't support your app it will explain why.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...