我的应用程序在Google Play上运行。 我想让它只与智能手机兼容。为此,我这样做了......
<uses-sdk
android:minSdkVersion="4"/>
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="false" />
而我的问题是市场不能过滤平板电脑(mdpi平板电脑,如三星tab1)。有些东西是一些手机,如WVGA800 *(480x800)(mdpi),WVGA800 **(480x800)(ldpi)大屏幕和一些平板电脑也在这个范围内。所以我想让手机不是平板电脑那么应该是什么解决方案???
我在这里找到了一些帮助http://developer.android.com/guide/topics/manifest/supports-screens-element.html
<uses-sdk
android:minSdkVersion="4"
android:targetSdkVersion="16" />
<supports-screens
android:largeScreens="true"
android:largestWidthLimitDp="320"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="false" />
它会在市场上运作吗??我问这种解决方案,如果有人有这方面的经验。我的问题是我无法通过上传新版本的应用程序测试。请帮助我..
替代方案可以做到。
提前致谢。
答案 0 :(得分:5)
您是否在AndroidManifest.xml中添加了“兼容屏幕”标签?这是Google Play根据屏幕尺寸过滤设备所使用的。
<compatible-screens>
<!-- small size screens -->
<screen android:screenSize="small" android:screenDensity="ldpi" />
<screen android:screenSize="small" android:screenDensity="mdpi" />
<screen android:screenSize="small" android:screenDensity="hdpi" />
<screen android:screenSize="small" android:screenDensity="xhdpi" />
<!-- all normal size screens -->
<screen android:screenSize="normal" android:screenDensity="ldpi" />
<screen android:screenSize="normal" android:screenDensity="mdpi" />
<screen android:screenSize="normal" android:screenDensity="hdpi" />
<screen android:screenSize="normal" android:screenDensity="xhdpi" />
<!-- large screens -->
<screen android:screenSize="large" android:screenDensity="hdpi" />
<screen android:screenSize="large" android:screenDensity="xhdpi" />
</compatible-screens>
不包括android:screenSize =“xlarge”,你的应用程序不会出现10.1“平板电脑.android:screenSize =”large“有点棘手。它可能是高达7”的设备所以Galaxy Tab 7 “属于这一类。但我不确定新的Galaxy S3,或者带有4.75”屏幕的Galaxy Nexus是否属于“大屏幕”类别。
尝试将上述代码段添加到AndroidManifest.xml中,如果Google Play在支持的设备列表中包含7个“平板电脑”,则可以随时将其删除。
答案 1 :(得分:0)
所有Android平板电脑都在HONEYCOMB(level 11, 12, 13
)上运行。您可以禁止在Honeycomb上安装。现在,您可能想知道如何使用min-sdk
和max-sdk
说明符从API级别序列的中间排除某些特定的API级别(即:11,12和13,从1到15)他们不支持范围。
这是解决方案:
您可以在将其发布到Google Play时执行此操作。在Android中 上传应用程序时,Developer Console将进入APK文件选项卡 并检查高级模式。它可以让你上传2个apk文件 不同的sdk级别范围。但是别忘了设置不同的版本 他们的代码。
控制台中的所有统计信息都将聚合为两个apk文件 它是一个。
因此,您可以创建两个apks(其中一个支持级别1到10,另一个支持级别14和15),这将阻止您的应用程序安装在平板电脑上。 : - )
答案 2 :(得分:0)
正如您所发现的那样,没有确切的或最好的方式。
此外,在Google Play上显示的应用程序名称中,仅保留关于谷歌播放的特别说明,如仅限电话。
对于大屏幕下大多数7英寸屏幕,您的应用程序可以在7英寸平板电脑上使用。 如果您上传了两个APK,则Google Play会为您的设备提供正确的APK。
如果您的应用程序仅限电话并且明确使用平板电脑上没有的电话功能,那么您可以添加代码检查,即使已安装,也不允许用户进一步移动。
由于你对平板电脑不感兴趣,你不在乎。
最佳做法是假设7“平板电脑落入大屏幕手机应该考虑开发工作。 由于Android平板电脑具有包括呼叫(VOIP)在内的所有功能。