2013-07-18 78 views
0

我剛纔提出使用PhoneGap的它被設計爲只使用平板電腦的Android應用程序。然而,應用程序上傳到谷歌播放後,它說,它僅適用於手機,不能在平板電腦上安裝:/Android應用,平板電腦僅在谷歌玩。怎麼樣?

我怎樣才能讓這個應用程序僅適用於平板電腦?

這是我AndroidManifest文件:

<?xml version="1.0" encoding="utf-8"?> 
<!-- 
     Licensed to the Apache Software Foundation (ASF) under one 
     or more contributor license agreements. See the NOTICE file 
     distributed with this work for additional information 
     regarding copyright ownership. The ASF licenses this file 
     to you under the Apache License, Version 2.0 (the 
     "License"); you may not use this file except in compliance 
     with the License. You may obtain a copy of the License at 

     http://www.apache.org/licenses/LICENSE-2.0 

     Unless required by applicable law or agreed to in writing, 
     software distributed under the License is distributed on an 
     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
     KIND, either express or implied. See the License for the 
     specific language governing permissions and limitations 
     under the License. 
--> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:windowSoftInputMode="adjustPan" 
     package="com.p4l.inhome" android:versionName="1.0" android:versionCode="1" android:hardwareAccelerated="true"> 
    <supports-screens 
     android:largeScreens="true" 
     android:normalScreens="true" 
     android:smallScreens="true" 
     android:xlargeScreens="true" 
     android:resizeable="true" 
     android:anyDensity="true" 
     /> 

    <uses-permission android:name="android.permission.CAMERA" /> 
    <uses-permission android:name="android.permission.VIBRATE" /> 
    <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.INTERNET" /> 
    <uses-permission android:name="android.permission.RECEIVE_SMS" /> 
    <uses-permission android:name="android.permission.RECORD_AUDIO" /> 
    <uses-permission android:name="android.permission.RECORD_VIDEO"/> 
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> 
    <uses-permission android:name="android.permission.READ_CONTACTS" /> 
    <uses-permission android:name="android.permission.WRITE_CONTACTS" /> 
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 
    <uses-permission android:name="android.permission.GET_ACCOUNTS" /> 
    <uses-permission android:name="android.permission.BROADCAST_STICKY" /> 


    <application android:icon="@drawable/icon" android:label="@string/app_name" 
     android:hardwareAccelerated="true" 
     android:debuggable="true"> 
     <activity 
      android:hardwareAccelerated="true" 
      android:screenOrientation="landscape" 
      android:name="InHomeFinal" android:label="Pay4Later InHome" 
       android:theme="@android:style/Theme.Black.NoTitleBar" 
       android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"> 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 
       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 
    </application> 

    <uses-sdk android:minSdkVersion="7" android:targetSdkVersion="17"/> 
</manifest> 

感謝

+2

你嘗試到suppport屏更改爲:<支持屏 機器人:largeScreens = 「真」 機器人:normalScreens = 「假」 機器人:smallScreens = 「假」 機器人:xlargeScreens = 「真」 android:resizeable =「true」 android:anyDensity =「true」 /> – Horschtele

+0

還檢查您是否需要所有權限bcoz google play根據權限篩選應用 –

+1

這對您有用:http:// developer .android.com /引導/做法/屏幕-distribution.html – JJ86

回答

1

變化明顯的是這樣的:

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

<uses-sdk 
    android:minSdkVersion="11" 
    android:targetSdkVersion="14" /> 

這將防止任何小/移動設備安裝應用程序。只有在大屏幕設備將必須安裝應用程序的特權。 Play商店會根據這些設置自動選擇設備。

+0

好吧,我將這樣做。它怎麼默認只有手機?它肯定會選擇手機和平板電腦? – user2595157

+0

對於大粒的最低SDK版本開始於13谷歌建議將其設置爲14片。 – mbokil

相關問題