gpt4 book ai didi

android - 如何使应用程序兼容平板电脑?

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

我想让我的应用程序与平板电脑兼容,我已经阅读了所有相关内容,并确保没有任何使用功能是特定于手机的,并添加了所有尺寸的支持屏幕(如您在我的 list 中所见)。但我仍然看到 Playstore 无法将我的应用程序识别为平板电脑兼容。请向我提供帮助我解决此问题的分步说明或兼容的 list 副本。 (我已经在寻找一些开源应用程序,它们不提供这些标签,但仍然可以在平板电脑上使用。例如:actionbarsherlock 演示)

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.myapp"
android:versionCode="15"
android:versionName="1.8" >

<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />

<!-- USES PERMISSSION -->

<uses-permission android:name="android.permission.ACCESS_GPS" />
<uses-permission android:name="android.permission.ACCESS_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_ASSISTED_GPS" />
<uses-permission android:name="android.permission.ACCESS_CELL_ID" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.RESTART_PACKAGES" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

<!-- REQUIRED FOR GCM -->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.BROADCAST_STICKY" />

<permission
android:name="com.myapp.permission.C2D_MESSAGE"
android:protectionLevel="signature" />

<uses-permission android:name="com.myapp.permission.C2D_MESSAGE" />

<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true"
android:xlargeScreens="true" />

<application
android:name=".app.MyApp"
android:allowBackup="false"
android:debuggable="false"
android:icon="@drawable/launcher"
android:label="@string/app_name"
android:theme="@style/MainTheme" >

<!-- USES LIBRARY -->
<uses-library android:name="com.google.android.maps" />

<!-- ACTIVITY -->
<activity
android:name=".app.activities.Splash"
android:clearTaskOnLaunch="true"
android:configChanges="keyboardHidden|orientation"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:theme="@style/Holo.Theme.Light.DarkActionBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- On-boarding -->
<activity
android:name=".app.activities.MainWellcome"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/Holo.Theme.Light.DarkActionBar" >
</activity>
<activity
android:name=".app.activities.DoxLogin"
android:configChanges="keyboardHidden|orientation"
android:parentActivityName=".app.activities.MainWellcome"
android:screenOrientation="portrait"
android:theme="@style/Holo.Theme.Light.DarkActionBar" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".app.activities.MainWellcome" />
</activity>
<activity
android:name=".app.activities.GuestRegisterSelectOccupation"
android:configChanges="keyboardHidden|orientation"
android:parentActivityName=".app.activities.MainWellcome"
android:screenOrientation="portrait"
android:theme="@style/Holo.Theme.Light.DarkActionBar" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".app.activities.MainWellcome" />
</activity>
<activity
android:name=".app.activities.GuestRegister"
android:configChanges="keyboardHidden|orientation"
android:parentActivityName=".app.activities.GuestRegisterSelectOccupation"
android:screenOrientation="portrait"
android:theme="@style/Holo.Theme.Light.DarkActionBar" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".app.activities.GuestRegisterSelectOccupation" />
</activity>
<activity
android:name=".app.activities.WebViewRegistration"
android:configChanges="keyboardHidden|orientation"
android:launchMode="singleTop"
android:parentActivityName=".app.activities.MainWellcome"
android:screenOrientation="portrait"
android:theme="@style/Holo.Theme.Light.DarkActionBar" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".app.activities.MainWellcome" />
</activity>

<!-- SETTINGS -->

<activity
android:name=".app.activities.Settings"
android:configChanges="keyboardHidden|orientation"
android:parentActivityName=".app.activities.AmHome"
android:screenOrientation="portrait"
android:theme="@style/Holo.Theme.Light.DarkActionBar" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".app.activities.AmHome" />
</activity>
<activity
android:name=".app.activities.Help"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/Holo.Theme.Light.DarkActionBar" >
</activity>
<activity
android:name=".app.activities.ManageAccounts"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/Holo.Theme.Light.DarkActionBar"
android:windowSoftInputMode="adjustResize" >
</activity>
<activity
android:name=".app.activities.EditAccount"
android:configChanges="keyboardHidden|orientation"
android:parentActivityName=".app.activities.ManageAccounts"
android:screenOrientation="portrait"
android:theme="@style/Holo.Theme.Light.DarkActionBar"
android:windowSoftInputMode="adjustResize" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".app.activities.ManageAccounts" />
</activity>
<!-- Am -->
<activity
android:name=".app.activities.AmHome"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/Holo.Theme.Light.DarkActionBar"
android:windowSoftInputMode="adjustResize" >
</activity>
<activity
android:name=".app.activities.AddAccount"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/Holo.Theme.Light.DarkActionBar"
android:windowSoftInputMode="adjustResize" >
</activity>
<activity
android:name=".app.activities.AddNickname"
android:configChanges="keyboardHidden|orientation"
android:parentActivityName=".app.activities.AddAccount"
android:screenOrientation="portrait"
android:theme="@style/Holo.Theme.Light.DarkActionBar"
android:windowSoftInputMode="adjustResize" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".app.activities.AddAccount" />
</activity>
<activity
android:name=".app.activities.WhoOnCall"
android:configChanges="keyboardHidden|orientation"
android:parentActivityName=".app.activities.SelectAccount"
android:screenOrientation="portrait"
android:theme="@style/Holo.Theme.Light.DarkActionBar"
android:windowSoftInputMode="adjustResize" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".app.activities.SelectAccount" />
</activity>
<activity
android:name=".app.activities.SelectDepartment"
android:configChanges="keyboardHidden|orientation"
android:parentActivityName=".app.activities.AddNickname"
android:screenOrientation="portrait"
android:theme="@style/Holo.Theme.Light.DarkActionBar"
android:windowSoftInputMode="adjustResize" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".app.activities.AddNickname" />
</activity>
<activity
android:name=".app.activities.SelectAccount"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/Holo.Theme.Light.DarkActionBar"
android:windowSoftInputMode="adjustResize" >
</activity>
<activity
android:name=".app.activities.ManageSchedules"
android:configChanges="keyboardHidden|orientation"
android:parentActivityName=".app.activities.MyCalendar"
android:screenOrientation="portrait"
android:theme="@style/Holo.Theme.Light.DarkActionBar"
android:windowSoftInputMode="adjustResize" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".app.activities.MyCalendar" />
</activity>
<activity
android:name=".app.activities.EditSchedule"
android:configChanges="keyboardHidden|orientation"
android:parentActivityName=".app.activities.ManageSchedules"
android:screenOrientation="portrait"
android:theme="@style/Holo.Theme.Light.DarkActionBar"
android:windowSoftInputMode="adjustResize" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".app.activities.ManageSchedules" />
</activity>
<activity
android:name=".app.activities.EventDetail"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/Holo.Theme.Light.DarkActionBar"
android:windowSoftInputMode="adjustResize" >
</activity>
<activity
android:name=".app.activities.SelectSchedule"
android:configChanges="keyboardHidden|orientation"
android:parentActivityName=".app.activities.SelectAccount"
android:screenOrientation="portrait"
android:theme="@style/Holo.Theme.Light.DarkActionBar"
android:windowSoftInputMode="adjustResize" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".app.activities.SelectAccount" />
</activity>
<activity
android:name=".app.activities.MyCalendar"
android:configChanges="keyboardHidden|orientation"
android:parentActivityName=".app.activities.AmHome"
android:screenOrientation="portrait"
android:theme="@style/Holo.Theme.Light.DarkActionBar"
android:windowSoftInputMode="adjustResize" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".app.activities.AmHome" />
</activity>
<activity
android:name=".app.activities.NewPage"
android:configChanges="keyboardHidden|orientation"
android:parentActivityName=".app.activities.WhoOnCall"
android:screenOrientation="portrait"
android:theme="@style/Holo.Theme.Light.DarkActionBar"
android:windowSoftInputMode="stateVisible" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".app.activities.WhoOnCall" />
</activity>

<service android:name=".app.services.SystemActivationServices" />

<!-- Used for install referrer tracking -->
<receiver android:name=".func.mycalendar.SynchronizationAmReceiver" >
<intent-filter>
<action android:name="com.myapp.synchonize" />
</intent-filter>
</receiver>

<!-- REQUIRED for Urban Airship GCM -->
<receiver android:name="com.urbanairship.CoreReceiver" />
<receiver
android:name="com.urbanairship.push.GCMPushReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />

<category android:name="com.myapp" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.PACKAGE_REPLACED" />

<data android:scheme="package" />
</intent-filter>
</receiver>

<service
android:name="com.urbanairship.push.PushService"
android:label="Push Notification Service" />
<service
android:name="com.urbanairship.analytics.EventService"
android:label="Event Service" />


<provider
android:name="com.urbanairship.UrbanAirshipProvider"
android:authorities="com.myapp.urbanairship.provider"
android:exported="false"
android:multiprocess="true" />
<!-- END OF REQUIRED ITEMS -->


<!-- OPTIONAL (for segments support) -->
<service
android:name="com.urbanairship.location.LocationService"
android:label="Segments Service" />

<receiver android:name="com.myapp.func.pushnotification.IntentReceiver" />
</application>

</manifest>

Edit1:我将 android:required="false"添加到除 INTERNET 和 ACCESS_NETWORK_STATE 之外的所有用户权限标签(因为我的应用程序在没有互联网的情况下无法运行)。还添加了:

<uses-feature android:name="android.hardware.LOCATION" android:required="false" />
<uses-feature android:name="android.hardware.location.GPS" android:required="false" />
<uses-feature android:name="android.hardware.location.NETWORK" android:required="false" />
<uses-feature android:name="android.hardware.screen.PORTRAIT" android:required="false" />
<uses-feature android:name="android.hardware.TELEPHONY" android:required="false" />
<uses-feature android:name="android.hardware.TOUCHSCREEN" android:required="false" />
<uses-feature android:name="android.hardware.WIFI" android:required="false" />

还是没有好结果。

最佳答案

你不需要这个:

<uses-permission android:name="android.permission.ACCESS_CELL_ID" />

也不是这个:

<uses-permission android:name="android.permission.BROADCAST_STICKY" />

而不是 ACTION_CALL 使用 ACTION_DIAL,然后你就不需要这个了:

<uses-permission android:name="android.permission.CALL_PHONE" />

您现在应该对平板电脑更加友好。

关于android - 如何使应用程序兼容平板电脑?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18219583/

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