gpt4 book ai didi

android - 尝试使我的应用程序与 Google Play 中的平板电脑兼容

转载 作者:行者123 更新时间:2023-11-29 21:24:00 25 4
gpt4 key购买 nike

我正在尝试让 Google play 识别我的应用程序可以在平板电脑上运行。它给了我这两个“优化”建议:

“利用平板电脑中可用的额外屏幕区域”“正确声明硬件功能依赖关系”

实际上,我的应用程序几乎一直在 opengl 上运行,但我有一个小代码用于拍照。

这是我的 list 文件:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="totalcross.android"
android:versionCode="-1"
android:versionName="!1.0!"
android:sharedUserId="totalcross.app.sharedid"
>

<!-- ATTENTION: THIS IS *** NOT *** FOR THE SINGLE APK - THERE'S ANOTHER MANIFEST FILE
FOR STANDARD SINGLE APK APPLICATIONS AT
P:\gitrepo\TotalCross\TotalCrossVM\builders\android\apps\tcvm\AndroidManifest.xml -->

<application android:icon="@drawable/icon" android:label="TotalCross Virtual Machine"
android:theme="@android:style/Theme.Black.NoTitleBar" >
<activity android:name=".Loader"
android:configChanges="keyboardHidden|orientation|screenLayout|fontScale|keyboard"
android:windowSoftInputMode="adjustResize"
/>
<activity android:name=".RouteViewer"/>
<activity android:name=".TouchImageViewer" />
<activity android:name=".WebViewer" />
<activity android:name=".CameraViewer" />
<activity android:name=".MapViewer" />
<uses-library android:name="com.google.android.maps" android:required="false" />
<activity android:name=".CaptureActivity"
android:screenOrientation="landscape"
android:clearTaskOnLaunch="true"
android:stateNotNeeded="true"
android:configChanges="orientation|keyboardHidden"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:windowSoftInputMode="stateAlwaysHidden">
<intent-filter>
<action android:name="totalcross.zxing.client.android.SCAN"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="11" />
<uses-permission android:name="android.permission.READ_LOGS" android:required="false"/>
<uses-permission android:name="android.permission.WRITE_MEDIA_STORAGE" android:required="false"/>
<uses-permission android:name="android.permission.INTERNET" android:required="false"/>
<uses-permission android:name="android.permission.WRITE_APN_SETTINGS" android:required="false"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" android:required="false"/>
<uses-permission android:name="android.permission.WRITE_SETTINGS" android:required="false"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" android:required="false"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" android:required="false"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" android:required="false"/>
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" android:required="false"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:required="false"/>
<uses-permission android:name="android.permission.VIBRATE" android:required="false"/>
<uses-permission android:name="android.permission.CAMERA" android:required="false"/>
<uses-permission android:name="android.permission.FLASHLIGHT" android:required="false"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" android:required="false"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" android:required="false"/>
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" android:required="false"/>
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" android:required="false"/>
<uses-permission android:name="android.permission.CONTROL_LOCATION_UPDATES" android:required="false"/>
<uses-permission android:name="android.permission.CALL_PHONE" android:required="false"/>
<uses-permission android:name="android.permission.CALL_PRIVILEGED" android:required="false"/>
<uses-permission android:name="android.permission.RECORD_AUDIO" android:required="false"/>
<uses-permission android:name="android.permission.BLUETOOTH" android:required="false"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:required="false"/>
<uses-feature android:name="android.hardware.camera" android:required="false"/>
<uses-feature android:name="android.hardware.camera.front" android:required="false"/>
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>
<uses-feature android:name="android.hardware.camera.flash" android:required="false"/>
<uses-feature android:glEsVersion="0x00020000"/>
<compatible-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" />
<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" />
<screen android:screenSize="large" android:screenDensity="ldpi" />
<screen android:screenSize="large" android:screenDensity="mdpi" />
<screen android:screenSize="large" android:screenDensity="hdpi" />
<screen android:screenSize="large" android:screenDensity="xhdpi" />
<screen android:screenSize="xlarge" android:screenDensity="ldpi" />
<screen android:screenSize="xlarge" android:screenDensity="mdpi" />
<screen android:screenSize="xlarge" android:screenDensity="hdpi" />
<screen android:screenSize="xlarge" android:screenDensity="xhdpi" />
</compatible-screens>
</manifest>

如您所见,我指定了不需要我的所有功能和权限,并且还指定了所有可能的屏幕尺寸。

我的应用程序在平板电脑上运行,因为他们发布了第一台平板电脑,但直到本周我才将它添加到 Google Play。

另一件烦人的事情是,我必须不断生成新版本并上传到生产环境,以了解我的尝试是否有效。如果我们可以有一个应用程序来检查它,它会快得多。

一切顺利

古奇

最佳答案

“利用平板电脑的额外屏幕区域”

当我用彩色屏幕替换我的 10"屏幕截图时消失了。似乎他们看起来上传的屏幕截图上的空白量。与 AndroidManifest.xml 无关。

“正确声明硬件功能依赖关系”

看看这个: http://developer.android.com/guide/topics/manifest/uses-feature-element.html#permissions

在我的例子中,我添加了这些:

<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="11" />
<uses-permission android:name="android.permission.READ_LOGS" />
<uses-permission android:name="android.permission.WRITE_MEDIA_STORAGE" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_APN_SETTINGS"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.FLASHLIGHT"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"/>
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"/>
<uses-permission android:name="android.permission.CONTROL_LOCATION_UPDATES"/>
<uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-permission android:name="android.permission.CALL_PRIVILEGED"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-feature android:name="android.hardware.camera" android:required="false"/>
<uses-feature android:name="android.hardware.camera.front" android:required="false"/>
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>
<uses-feature android:name="android.hardware.camera.flash" android:required="false"/>
<uses-feature android:name="android.hardware.bluetooth" android:required="false"/>
<uses-feature android:name="android.hardware.microphone" android:required="false"/>
<uses-feature android:name="android.hardware.location" android:required="false"/>
<uses-feature android:name="android.hardware.location.network" android:required="false"/>
<uses-feature android:name="android.hardware.location.gps" android:required="false"/>
<uses-feature android:name="android.hardware.telephony" android:required="false"/>
<uses-feature android:name="android.hardware.wifi" android:required="false"/>

关于android - 尝试使我的应用程序与 Google Play 中的平板电脑兼容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20380839/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com