我正在努力让Google Play认识到我的应用程序适用于平板电脑。它给了我这两个“优化”建议:
“利用平板电脑提供的额外屏幕区域” “正确声明硬件功能依赖”
实际上,我的应用程序几乎一直在opengl上运行,但是我在拍照时有一个很小的代码。
这是我的清单文件:
<?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。
令人讨厌的另一件事是我必须继续生成新版本并上传到生产中以便在我的尝试工作与否时进行调查。如果我们可以有一个应用程序来检查它,它会更快。
一切顺利
guich
答案 0 :(得分:2)
“充分利用平板电脑提供的额外屏幕区域”
当我用彩色屏幕替换我的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"/>